Danovh Posted April 12, 2012 Share Posted April 12, 2012 Is it possible to have 2 text frames using the same data field, but one using odd # records & the other using even # records? Quote Link to comment Share on other sites More sharing options...
FreightTrain Posted April 12, 2012 Share Posted April 12, 2012 Danovh, yes you can accomplish this. I'm guessing you want to suppress one of the frames based on the record being odd or even... At least that is what my code below is showing. if (FusionPro.Composition.inputRecordNumber % 2) //this is validating if the record # is odd { FindTextFrame("Red").suppress=true; } else { FindTextFrame("Blue").suppress=true; } My template had 2 frames with the same content, one with text in red one in blue (hence the frame names), so if the record number is odd then "Red" is suppressed, if even then "Blue" is. Hope this helps Quote Link to comment Share on other sites More sharing options...
FreightTrain Posted April 12, 2012 Share Posted April 12, 2012 Oh and this was defined in the OnRecordStart rule. Quote Link to comment Share on other sites More sharing options...
Danovh Posted April 12, 2012 Author Share Posted April 12, 2012 Thanks Richard, I'll try it out as soon as I get a chance and let you know how it worked. Quote Link to comment Share on other sites More sharing options...
Danovh Posted April 17, 2012 Author Share Posted April 17, 2012 I tried the rule and get this error when I validate,"OnRecordStart, line 8: ReferenceError: FindTextFrame is not defined". Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 17, 2012 Share Posted April 17, 2012 I tried the rule and get this error when I validate,"OnRecordStart, line 8: ReferenceError: FindTextFrame is not defined". You need to be running FusionPro 6.0 or later in order to use the JavaScript frame API. I highly recommend upgrading, as there are tons of new features in the three major revisions of FusionPro since version 5. That said, you may be able to achieve something similar in FusionPro 5 with the FusionPro.Composition.SetBodyPageUsage function, where you have frames bringing in completely different data on different pages. Quote Link to comment Share on other sites More sharing options...
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.