I have a multi-page PDF that will use only one of the pages based on the state the user selects. I've set all of the pages to "Unused" under manage pages, and have created a rule for OnRecordStart. This rule works fine and gives me the results I expect. However, it gives me the error "Function Does Not Return a Value" when I save the rule. It also gives me an error when I compose it, but the composed file IS correct. I'm guessing that my script is missing something. Here's what I have in OnRecordStart:
if (Field("State") == "Florida")
{
FusionPro.Composition.SetBodyPageUsage("MC34310_FL", true);
}
else if (Field("State") == "New Hampshire")
{
FusionPro.Composition.SetBodyPageUsage("MC34285_NH", true);
}
else if (Field("State") == "New York")
{
FusionPro.Composition.SetBodyPageUsage("MC34467_NY", true);
}
else if (Field("State") == "Texas")
{
FusionPro.Composition.SetBodyPageUsage("MC34700_TX_1210", true);
}
else
{
FusionPro.Composition.SetBodyPageUsage("MC34188", true);
}