Jump to content

A_Poole13

Registered Users - Approved
  • Posts

    3
  • Joined

Everything posted by A_Poole13

  1. This works beautifully! Thank you so much!
  2. This is what I have so far. My thought process is that I need to loop through the field(Output) number. Example: field (Output) = 5. For every loop I need to show a specific page (1st loop - PageA, 2nd loop - PageB), if I get to the 4th loop, I need to set my counter to 1 so I pull PageA for the 5th loop because there are only 4 pages in my FusionPro document. I hope this is making sense. The code below is only giving me PageD for all records, which is incorrect so I am missing something. var PDFpages = "" var loopcount = 1 for (var pageLoop = 1; pageLoop <= Field("Output") ; pageLoop++) { if (loopcount = 1){ PDFpages += FusionPro.Composition.SetBodyPageUsage("PageA", true); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageB", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageC", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageD", false); loopcount = 2; } else if (loopcount = 2){ PDFpages += FusionPro.Composition.SetBodyPageUsage("PageA", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageB", true); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageC", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageD", false); loopcount = 3; } else if (loopcount = 3){ PDFpages += FusionPro.Composition.SetBodyPageUsage("PageA", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageB", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageC", true); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageD", false); loopcount = 4; } else if (loopcount = 4){ PDFpages += FusionPro.Composition.SetBodyPageUsage("PageA", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageB", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageC", false); PDFpages += FusionPro.Composition.SetBodyPageUsage("PageD", true); loopcount = 1; } } return PDFpages;
  3. I have a 4 page pdf that I need to loop through based on a field in the data and show the iteration of that loop as a variable on the page. Field = 5 show PDF Page 1, PDF Page 2, PDF Page 3, PDF Page 4, PDF Page 1 Field = 2 show PDF Page 1, PDF Page 2 Field = 7 show PDF Page 1, PDF Page 2, PDF Page 3, PDF Page 4, PDF Page 1, PDF Page 2, PDF Page 3 Thoughts?
×
×
  • Create New...