-Lisa- Posted November 6, 2019 Posted November 6, 2019 I'm not sure why I'm having so much difficulty with this one. I'm sure the answer is obvious: Working on a kiss cut label template set 4 up on a page in my template with a static background. There are up to 16 available fields in the data. I need to add additional pages with the same static background when data is present in fields 5 through 16. Field 6 won't exist unless there's data in Field 5. Field 10 won't exist unless there's data in Field 5 through 9, etc. I thought a basic OnRecordStart rule would work by creating a 4 page template and then enabling/disabling pages based on the presence of data in any field after #4 like this: if(Field("Card5") == "") { FusionPro.Composition.SetBodyPageUsage("Page2", false); FusionPro.Composition.SetBodyPageUsage("Page3", false) FusionPro.Composition.SetBodyPageUsage("Page4", false); if(Field("Card5") !="" && Field("Card9") =="" && Field("Card13") =="") { FusionPro.Composition.SetBodyPageUsage("Page2", true); FusionPro.Composition.SetBodyPageUsage("Page3", false) FusionPro.Composition.SetBodyPageUsage("Page4", false); } else if(Field("Card5") !="" && Field("Card9") !="" && Field("Card13") =="") { FusionPro.Composition.SetBodyPageUsage("Page2", true); FusionPro.Composition.SetBodyPageUsage("Page3", true); FusionPro.Composition.SetBodyPageUsage("Page4", false); } else if(Field("Card5") !="" && Field("Card9") !="" && Field("Card13") !="") FusionPro.Composition.SetBodyPageUsage("Page2", true); FusionPro.Composition.SetBodyPageUsage("Page3", true); FusionPro.Composition.SetBodyPageUsage("Page4", true); } Obviously I'm way off base here. Any thoughts? Quote
Dan Korn Posted November 6, 2019 Posted November 6, 2019 Well, you could use Overflow pages, and let the composition engine decide for you when additional pages are necessary. Then you wouldn't need any code for this at all. But with your current setup, I think this will work, if you initially set all the pages in question (2, 3, and 4) to be Unused in the Page Usage dialog: FusionPro.Composition.SetBodyPageUsage("Page2", (Field("Card5")); FusionPro.Composition.SetBodyPageUsage("Page3", (Field("Card9")); FusionPro.Composition.SetBodyPageUsage("Page4", (Field("Card13")); The other wrinkle here is the imposition ("4 up on a page"). Imposition requires each record to output the same number of pages. So you might be better off simply outputting all the pages, even if some are blank. 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.