dreimer Posted April 3, 2013 Share Posted April 3, 2013 So I am trying to set up a template where my unused slipsheet page will be inserted when the data changes in a field such as "Image". The number of records per "Image" will vary, but I will have the repeats built into the data file used so I don't need to use the RepeatRecord Function. I think it would neded to be an OnRecordStart rule, but not sure. Also, this will be one-up so no imposition file will be used. Is this possible with my current version of Fusion Pro? Any help would be great, TIA. Quote Link to comment Share on other sites More sharing options...
step Posted April 3, 2013 Share Posted April 3, 2013 You probably want to do something like this: JavaScript Globals: var img = ""; OnRecordStart: if (img != Field("Image")){ FusionPro.Composition.SetBodyPageUsage("Slipsheet",true); img = Field("Image"); } Quote Link to comment Share on other sites More sharing options...
dreimer Posted April 3, 2013 Author Share Posted April 3, 2013 Perfect, thank you Step. Love this forum!!!!!!!!! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted April 3, 2013 Share Posted April 3, 2013 You probably want to do something like this: JavaScript Globals: var img = ""; OnRecordStart: if (img != Field("Image")){ FusionPro.Composition.SetBodyPageUsage("Slipsheet",true); img = Field("Image"); } Actually, in FusionPro 8.0, it's even simpler, without requiring anything in the JavaScript Globals: if (FieldChanged("Image")) FusionPro.Composition.SetBodyPageUsage("Slipsheet", true);Or, even more succinctly: FusionPro.Composition.SetBodyPageUsage("Slipsheet", FieldChanged("Image"));Also, you can set the slip sheet arbitrarily like this even if you are using imposition, by setting the slip sheet to start at the beginning of a stack in the Composition Settings, and then starting a new stack like so in OnRecordStart: if (FieldChanged("Image")) FusionPro.Composition.StartNewStack(); Quote Link to comment Share on other sites More sharing options...
step Posted April 3, 2013 Share Posted April 3, 2013 Very true though his signature said he was running FP7.2 Quote Link to comment Share on other sites More sharing options...
marcuslayton Posted September 24, 2013 Share Posted September 24, 2013 can this: if (FieldChanged("Image")) FusionPro.Composition.StartNewStack(); be used when using a repeat record count - something like this: FusionPro.Composition.repeatRecordCount = Field("RunQty"); FusionPro.Composition.StartNewStack(); ? Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted September 24, 2013 Share Posted September 24, 2013 can this: if (FieldChanged("Image")) FusionPro.Composition.StartNewStack(); be used when using a repeat record count - something like this: FusionPro.Composition.repeatRecordCount = Field("RunQty"); FusionPro.Composition.StartNewStack(); ? Sure, but with that code, you'll get each output record in its own stack. You still need to tell it to start a new stack only when the input data changes. This should work: FusionPro.Composition.repeatRecordCount = Field("RunQty"); if (FieldChanged("Image")) FusionPro.Composition.StartNewStack(); Or, since you're repeating, if you want each input record to go to its own stack, you could do this: FusionPro.Composition.repeatRecordCount = Field("RunQty"); if (FusionPro.Composition.repeatRecordNumber == 1) FusionPro.Composition.StartNewStack(); Quote Link to comment Share on other sites More sharing options...
DCS Posted January 15, 2014 Share Posted January 15, 2014 So how would I get a slip sheet before every file written using this code if (FieldChanged("WelcomePackageCode")) { outpath = "c:\\Files\\Jan 14 Kits\\Mailing\\FS Labels\\" + Field("WelcomePackageCode") + "\\"; filename = Field("WelcomePackageCode"); outfile = outpath + filename; FusionPro.Composition.OpenNewOutputFile(outfile + "." + FusionPro.Composition.outputFormatExtension); } Also, Can I get the slipsheet to impose like the rest of the file thanks Mike Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 15, 2014 Share Posted January 15, 2014 So how would I get a slip sheet before every file written using this code if (FieldChanged("WelcomePackageCode")) { outpath = "c:\\Files\\Jan 14 Kits\\Mailing\\FS Labels\\" + Field("WelcomePackageCode") + "\\"; filename = Field("WelcomePackageCode"); outfile = outpath + filename; FusionPro.Composition.OpenNewOutputFile(outfile + "." + FusionPro.Composition.outputFormatExtension); } This is pretty much what we've been talking about in the rest of this thread. Just add a call to FusionPro.Composition.StartNewStack() in there, and in the Composition Settings, under Imposition, make sure you have the slip sheet set to be output at the beginning of a stack. Also, Can I get the slipsheet to impose like the rest of the file I don't understand the question. If the sheet is imposed with the rest of the output pages, then it's not really a slip sheet, by definition. If that's what you want to do, then forget about slip sheets, and just call out an Unused Body Page, like so: FusionPro.Composition.SetBodyPageUsage("slipsheet", FieldChanged("WelcomePackageCode"));Which was basically what I said in my first post in this thread. Quote Link to comment Share on other sites More sharing options...
DCS Posted January 16, 2014 Share Posted January 16, 2014 I had already tried adding the FusionPro.Composition.StartNewStack() didin't work... Is there a place I should put it (within the brackets, outside)? I will try your 2nd suggestion... where should I put that? Thanks Mike Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 16, 2014 Share Posted January 16, 2014 I had already tried adding the FusionPro.Composition.StartNewStack() didin't work... You have to be using stacked imposition, for one thing. And you have to have the setting I mentioned in the Composition Settings. Anyway, it's hard to answer these kinds of questions in the abstract without knowing more about the particulars of the job. Is there a place I should put it (within the brackets, outside)? Yes, inside the brackets, so you get a new stack, and a slip sheet, when the field value changes. I will try your 2nd suggestion... where should I put that? All of these examples would go in OnRecordStart. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.