PDA

View Full Version : Page Cycle Rule


rsager
September 7th, 2012, 11:18 AM
Hello,

I am trying to create a rule that will return a cycle number (1-7) so our envelope machine can read the number. I have a 3 page letter with 1200 records and I end up with 3600 printed pages. I need the the page numbering to return back to 1 for page 8,15,22,29 and so on. Can a simple rule be created to do this.

Thanks

Bob Sager

Dan Korn
September 7th, 2012, 12:15 PM
Yes, in FusionPro 8.1, you can use the OnPageNumber rule to modify the value set by the $pagenum variable.

rsager
September 7th, 2012, 12:39 PM
Thanks Dan,
I have the OnPageNumber Rule but I'm not sure what the change would be.

// Note: Always returns 1 for rule validation in the Rule Editor
return FusionPro.Composition.currentPageNumber;

Dan Korn
September 7th, 2012, 12:55 PM
Thanks Dan,
I have the OnPageNumber Rule but I'm not sure what the change would be.

// Note: Always returns 1 for rule validation in the Rule Editor
return FusionPro.Composition.currentPageNumber;
Probably this:
return ((FusionPro.Composition.currentPageNumber - 1) % 7) + 1;
The percent sign "%" is the modulus (remainder) operator (https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Arithmetic_Operators#.C2.A0.25_%28Modulus%29) in JavaScript.