The job I am trying to set up is a form that has 12 pages to a set and after the 12th page I need to insert a letter. The complex part (for me is that the sets and letters can be different languages. Through page usage, I have set the names for the PDF pages. For example, I have a English form front and back, and the English letter front and back, a Chinese form front and back and a Chinese letter front and back and so on. I think there are 14 different languages, so the PDF has 56 pages.
The spreadsheet has a field for the sequence which is populated with a number 1 -12 for each record, and there is also a field for language.
I am using the OnRecordStart rule, and when I compose the PDF, the form pages look like they get added correctly, but it is not adding the letter page. Here is a sample of the OnRecordStart rule:
if ((Field("LCLanguage") == "ENGLISH-USCAN")) {
FusionPro.Composition.SetBodyPageUsage("C23A EN front", true)
FusionPro.Composition.SetBodyPageUsage("C23A EN Back", true)
}
else if ((Field("LCLanguage") == "CHINESE")) {
FusionPro.Composition.SetBodyPageUsage("C23A CH Front", true)
FusionPro.Composition.SetBodyPageUsage("C23A CH Back", true)
}
else if ((Field("LCLanguage") == "PORTUGUESE")) {
FusionPro.Composition.SetBodyPageUsage("C23A PO Front", true)
FusionPro.Composition.SetBodyPageUsage("C23A PO Back", true)
}
else if ((Field("LCLanguage") == "SPANISH")) {
FusionPro.Composition.SetBodyPageUsage("C23A SP Front", true)
FusionPro.Composition.SetBodyPageUsage("C23A SP Back", true)
}
else if ((Field("LCLanguage") == "ENGLISH-USCAN") && (Field("SequenceID") == "12")) {
FusionPro.Composition.SetBodyPageUsage("MMR Letter EN Front", true)
FusionPro.Composition.SetBodyPageUsage("MMR Letter EN Back", true)
}
else if ((Field("LCLanguage") == "CHINESE") && (Field("SequenceID") == "12")) {
FusionPro.Composition.SetBodyPageUsage("MMR Letter CH Front", true)
FusionPro.Composition.SetBodyPageUsage("MMR Letter CH Back", true)
}
else if ((Field("LCLanguage") == "PORTUGUESE") && (Field("SequenceID") == "12")) {
FusionPro.Composition.SetBodyPageUsage("MMR Letter PO Front", true)
FusionPro.Composition.SetBodyPageUsage("MMR Letter PO Back", true)
}
else if ((Field("LCLanguage") == "SPANISH") && (Field("SequenceID") == "12")) {
FusionPro.Composition.SetBodyPageUsage("MMR Letter SP Front", true)
FusionPro.Composition.SetBodyPageUsage("MMR Letter SP Back", true)
}
With my limited knowledge of creating rules, this one has stumped me. Any help would be greatly appreciated.
Thanks
Jim