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?