Olivier Posted March 22, 2014 Share Posted March 22, 2014 Hi friends, I have a 3 pages template with an "OnRecordStart" rule base on a picture version choice to define witch page will be composed. It is working fine in FP 9.1.0 but the 3 pages are composed in MarcomCentral... Any idea ? Here is the rule : if (Field("Version")=="ABRIBUSDIRECTIONNELgauche1") { FusionPro.Composition.SetBodyPageUsage("Two", false); } if (Field("Version")=="ABRIBUSDIRECTIONNELgauche1") { FusionPro.Composition.SetBodyPageUsage("Three", false); } if (Field("Version")=="ABRIBUSDIRECTIONNELgauche2") { FusionPro.Composition.SetBodyPageUsage("One", false); } if (Field("Version")=="ABRIBUSDIRECTIONNELgauche2") { FusionPro.Composition.SetBodyPageUsage("Three", false); } if (Field("Version")=="ABRIBUSDIRECTIONNELgauche3") { FusionPro.Composition.SetBodyPageUsage("One", false); } if (Field("Version")=="ABRIBUSDIRECTIONNELgauche3") { FusionPro.Composition.SetBodyPageUsage("Two", false); } else FusionPro.Composition.SetBodyPageUsage("One", true); Quote Link to comment Share on other sites More sharing options...
jwhittaker Posted March 24, 2014 Share Posted March 24, 2014 Oliver Try this. You need to make sure the pages are not set to unused in page usage and the pages are named "One", "Two" and "Three" if (Field("Version")=="ABRIBUSDIRECTIONNELgauche1") { FusionPro.Composition.SetBodyPageUsage("Two", false); FusionPro.Composition.SetBodyPageUsage("Three", false); } else if (Field("Version")=="ABRIBUSDIRECTIONNELgauche2") { FusionPro.Composition.SetBodyPageUsage("One", false); FusionPro.Composition.SetBodyPageUsage("Three", false); } else if (Field("Version")=="ABRIBUSDIRECTIONNELgauche3") { FusionPro.Composition.SetBodyPageUsage("One", false); FusionPro.Composition.SetBodyPageUsage("Two", false); } else FusionPro.Composition.SetBodyPageUsage("One", true); Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted March 24, 2014 Share Posted March 24, 2014 (edited) If you set all three pages to be Unused in the Page Usage dialog, then the entire rule can be reduced to this: FusionPro.Composition.SetBodyPageUsage(Int(Right(Field("Version"), 1)) || 1, true);However, the original rule should work the same way in MarcomCentral as it does in a local composition on your machine. If it's not, then this is actually a MarcomCentral-specific question, which should be asked on the MarcomCentral forum. That said, it's probably an issue of the field value being something different than what you expect. If it's really a graphic field, then MarcomCentral is probably putting a full path to the graphic in the data, possibly with a <graphic> tag. I would add a text frame to the job and just output the "Version" field as text to verify this. Depending on what that shows, you might need to add a call to the GetFileName function. Edited March 24, 2014 by Dan Korn Quote Link to comment Share on other sites More sharing options...
Olivier Posted March 25, 2014 Author Share Posted March 25, 2014 Thank you all, it's working fine ! Best regards, Olivier Oliver Try this. You need to make sure the pages are not set to unused in page usage and the pages are named "One", "Two" and "Three" if (Field("Version")=="ABRIBUSDIRECTIONNELgauche1") { FusionPro.Composition.SetBodyPageUsage("Two", false); FusionPro.Composition.SetBodyPageUsage("Three", false); } else if (Field("Version")=="ABRIBUSDIRECTIONNELgauche2") { FusionPro.Composition.SetBodyPageUsage("One", false); FusionPro.Composition.SetBodyPageUsage("Three", false); } else if (Field("Version")=="ABRIBUSDIRECTIONNELgauche3") { FusionPro.Composition.SetBodyPageUsage("One", false); FusionPro.Composition.SetBodyPageUsage("Two", false); } else FusionPro.Composition.SetBodyPageUsage("One", true); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.