RSloan Posted July 9, 2013 Posted July 9, 2013 (edited) I am trying to execute 2 independent if statements in the OnRecordStart rule. One is meant to manage a text box: if (Field("FieldName") =="") { FindTextFrame("MyTextFrame").fillColorName = "white"; FindTextFrame("MyTextFrame").content = "<span color=white>" + FindTextFrame("MyTextFrame").content; } The other activates a page in the document: if (Field("FieldName2") != "") { FusionPro.Composition.SetBodyPageUsage("OtherPage",true) } Can anyone explain how to keep these two statements independent of each other? I am unable to create 2 different OnRecordStart rules, so I am forced to place them in the same rule. I assume I can insert instructions to treat these statements on their own, but my searches for a solution have been fruitless so far. Thank you for taking the time to look at this. Edited July 9, 2013 by RSloan fixed CODE tags Quote
Dan Korn Posted July 9, 2013 Posted July 9, 2013 You can just put both statements, one after the other, in your OnRecordStart rule. They shouldn't interfere with each other in any way. Although I'm not sure what you're trying to accomplish by setting a frame's fill to white and setting all the text to white as well. Obviously you're not going to see any text that way. Maybe you just want to suppress the frame instead? Quote
RSloan Posted July 9, 2013 Author Posted July 9, 2013 Thank you very much, Dan. The code does seem to be executing properly as the statements are currently laid out. I was just worried that they may somehow misfire without some sort of END statement. As for the text frame rule, I am using it to "white-out" a portion of the background art for certain records. For the other records, this box is transparent allowing the background to show through (along with the black text in the box). Thanks again for the quick reply! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.