Christian Johnson Posted September 7, 2023 Share Posted September 7, 2023 Hello, I'm trying to output each record to its corresponding page quantity. I have a template that has 56 total pages because the record with the highest page quantity is 28 (Including front and back = 56). Meaning, if another record only has a page count of 1. I'll have 54 blank pages. Is there a rule I can make that only produces each record based on page count? There is a field in my data called "Page Qty" if needed. I've attached my collect FusionPro template for reference. J024928_ERB.zip Quote Link to comment Share on other sites More sharing options...
ThomasLewis Posted September 7, 2023 Share Posted September 7, 2023 Put this in OnRecordStart. Make sure it's enabled. The rule was turned off in sample provided. for (i = 56; i > Field("Page Qty") * 2; i--) FusionPro.Composition.SetBodyPageUsage(i, false); Quote Link to comment Share on other sites More sharing options...
Christian Johnson Posted September 8, 2023 Author Share Posted September 8, 2023 I get an error when trying this rule. Where did I go wrong? "OnRecordStart, line 1: SyntaxError: missing ; after for-loop condition" Quote Link to comment Share on other sites More sharing options...
ThomasLewis Posted September 8, 2023 Share Posted September 8, 2023 Did you copy and paste the lines or did you key them in? If you keyed them in you probably put a comma where a semicolon needs to go. Only way to know for sure is if you attach the PDF file. Quote Link to comment Share on other sites More sharing options...
Christian Johnson Posted September 8, 2023 Author Share Posted September 8, 2023 I keyed it in because FusionPro wouldn't let me copy and paste, but you're correct. I had a comma in place of a semicolon. It works beautifully now! Thank you so much for your help! I've attached an updated collected file if you want to see it in action. J024928_ERB.r1.zip 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.