Jump to content

Use of JobOptions in Rule


MSilber

Recommended Posts

Hi,

 

I want to use the value of FusionPro.Composition.JobOptions.UseImpositionDefFile which is Yes or No in a rule, but I cannot get this working.

 

In case I just return the value in a text frame it shows either Yes or No, but in case I use an if statement like

 

if (FusionPro.Composition.JobOptions.UseImpositionDefFile = "Yes")

{

return "Imposition";

}

else

{

return "noImposition";

}

I always get back "Imposition".

 

Any idea what I'm doing wrong?

I also tried to set a global variable with an OnJobstart callback rule but also with no success.

Maybe it is just an obvious mistake. :)

btw: There is no whitespace in the JobOptions value between Def and File

 

Thanks!

Link to comment
Share on other sites

Hi,

 

I want to use the value of FusionPro.Composition.JobOptions.UseImpositionDefFile which is Yes or No in a rule, but I cannot get this working.

 

In case I just return the value in a text frame it shows either Yes or No, but in case I use an if statement like

 

if (FusionPro.Composition.JobOptions.UseImpositionDefFile = "Yes")

{

return "Imposition";

}

else

{

return "noImposition";

}

I always get back "Imposition".

 

Any idea what I'm doing wrong?

The comparison operator in JavaScript is == (two equal signs, not one). The single equal sign = is for assignment.

 

So the first line of your rule should be this:

if (FusionPro.Composition.JobOptions.UseImpositionDefFile [color="SeaGreen"]==[/color] "Yes")

I also tried to set a global variable with an OnJobstart callback rule but also with no success.

I don't understand what you mean here.

btw: There is no whitespace in the JobOptions value between Def and File

Instead of simply copying the code into the forum here and changing the font, you should click the "Go Advanced" button, then use the # button to place your code into a Code block.

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...