Jump to content

Set Page Usage not working


Recommended Posts

I believe that's because you did not close the brackets on your if statements. So instead of having 6 if statements, you have 1 if statement with 5 nested if statements within it.

if (Field("VERSION") == "V1-A")
{
FusionPro.Composition.SetBodyPageUsage("1-A",true);

FusionPro.Composition.SetBodyPageUsage("BC",true);
[color="Red"]}[/color]
[color="Red"]else[/color] if (Field("VERSION") == "V1-B") [color="red"]{[/color]

FusionPro.Composition.SetBodyPageUsage("1-B",true);

FusionPro.Composition.SetBodyPageUsage("BC",true);
[color="red"]}[/color]

...etc...

 

Though I think you could really simplify things by setting the "BC" page to used instead of unused since you turn it on in every scenario, and replacing your entire OnRecordStart rule with this:

var vers = Field("VERSION").replace("V","");
FusionPro.Composition.SetBodyPageUsage(vers, true);

Edited by step
syntax
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...