Jump to content

OnRecordStart issue


Olivier

Recommended Posts

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);

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

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 by Dan Korn
Link to comment
Share on other sites

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);

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