Jump to content

Callback Rule OnRecordStart SetBodyPageUsage


Recommended Posts

Hello

 

I have a rule that does not work more.

 

After I have updated to 6.2P1A so it works no more.

 

Are there any who can help?

 

Sincerely,

 

René Bøtcher Jarmen

 

 

}

if (Field("Salgsbrev_filnavn") == "")

{

FusionPro.Composition.SetBodyPageUsage("1",false);

FusionPro.Composition.SetBodyPageUsage("2",false);

}

 

if (Field("indstik1_forside_filnavn") == "")

{

FusionPro.Composition.SetBodyPageUsage("3",false);

FusionPro.Composition.SetBodyPageUsage("4",false);

}

 

if (Field("indstik2_forside_filnavn") == "")

{

FusionPro.Composition.SetBodyPageUsage("5",false);

FusionPro.Composition.SetBodyPageUsage("6",false);

}

 

if (Field("indstik3_forside_filnavn") == "")

{

FusionPro.Composition.SetBodyPageUsage("7",false);

FusionPro.Composition.SetBodyPageUsage("8",false);

}

 

if (Field("indstik4_forside_filnavn") == "")

{

FusionPro.Composition.SetBodyPageUsage("9",false);

FusionPro.Composition.SetBodyPageUsage("10",false);

}

 

if (Field("ordreform_forside_filnavn") == "")

{

FusionPro.Composition.SetBodyPageUsage("11",false);

FusionPro.Composition.SetBodyPageUsage("12",false);

}

 

else

return "";

Link to comment
Share on other sites

What exactly do you mean by "does not work?" How is the output different than what you expect it to be? Are there any relevant messages in your log (.msg) file?

 

hi

 

I have used it to suppress the pages as I do not need.

 

all sides are set to used in "page usage" and if there in no data in the "field" then the page must be "Unused"

 

Now it takes alle pages.

 

René Bøtcher Jarmer

Nyt arkiv.zip

OUTputfile.pdf

AS I whant to be.pdf

Link to comment
Share on other sites

The problem is the initial, unmatched closing brace } on the first line of your rule. Remove that and everything should work properly.

 

I'm not sure why the JavaScript engine isn't flagging this as a syntax error; I'll look into that.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...