Jump to content

Rule for choosing different page layouts...


WBG-guy

Recommended Posts

I'm trying to create a rule where you choose from different business card page layouts. I currently have a three page pdf (in fusionpro) that you have to choose from page1 or page2 to go with the common back page. I went to "Manage Pages" called out page01, page02 and back. I then tried creating a rule from the "Callback" option "OnJobStart" and this is the javascript that I tried using...

 

if (Field("card") == "page02")

(

FusionPro.Composition.SetBodyPageUsage("page01", true);

)

 

When I validate I get an error message "OnJobStart, Line 3: SyntaxError: Missing ) in parenthetical"

 

I tried adding a ")" but I keep getting a Syntax error.

 

What am I doing wrong and can I get help!?? :(:confused::mad:

Link to comment
Share on other sites

WBG-guy

You got it almost right. You cannot use the regular parenthesis for the return portion of the script:

(

FusionPro.Composition.SetBodyPageUsage("page01", true);

)

Should use the "Piano brackets" instead:

{

FusionPro.Composition.SetBodyPageUsage("page01", true);

}

That will fix it.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...