Jump to content

odd or even records


Danovh

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...