Jump to content

Recommended Posts

Posted

I’m using this rule “OnRecordStart” to call in different pages based on the data and I want to add an “Error” page to this rule and i’m having an issue trying to write it. The “Error” page will be called in when there is no match in the data for “E” or “F”.

 

Help please.

 

 

if (Field(“Data") != "E")

{

FusionPro.Composition.SetBodyPageUsage("E", false)

}

if (Field("Data") != "F")

{

FusionPro.Composition.SetBodyPageUsage("F", false)

}

Posted

Set all the pages (E, F, error, etc.) to be unused initially, and do this in the rule:

try
{
   FusionPro.Composition.SetBodyPageUsage(Field("Data"), true);
}
catch (e)
{
   FusionPro.Composition.SetBodyPageUsage("Error", true);
}

Posted

Another issue Dan.

This works fine for Simplex, one sided only.

 

How would it work for Duplex, two sided per record?

 

Record1

Page1 = E

Page2 = E-2

 

Record2

Page1 = Error

Page2 = Error-2

 

Page 2 will always be what the data calls in + -2

Posted
Another issue Dan.

This works fine for Simplex, one sided only.

 

How would it work for Duplex, two sided per record?

 

Record1

Page1 = E

Page2 = E-2

 

Record2

Page1 = Error

Page2 = Error-2

 

Page 2 will always be what the data calls in + -2

Just do it again with the "-2":

try
{
   FusionPro.Composition.SetBodyPageUsage(Field("Data"), true);
}
catch (e)
{
   FusionPro.Composition.SetBodyPageUsage("Error", true);
}

try
{
   FusionPro.Composition.SetBodyPageUsage(Field("Data") + "-2", true);
}
catch (e)
{
   FusionPro.Composition.SetBodyPageUsage("Error-2", true);
}

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