Stack Posted May 15, 2019 Posted May 15, 2019 Hello all, I'm having a small issue with a rule to output a new file during composition, based on a field. Below is my code: if (FieldChanged("traymark_")) FusionPro.Composition.OpenNewOutputFile("63110_MM_SummerNewsletter2019_ADDRESSED_" + Field("sequence") + "_" + FusionPro.Composition.outputFormatExtension); The traymark_ field uses a double-asterisk to indicate a new tray. The issue is that with the above rule, a new file is output every time there's a change in that field. So for each double-asterisk record, a new file is output, and then another new file is output for those blank records that follow in the traymark_ field, until the next record with a double-asterisk. Basically, I'm getting double the amount of output files than I intend. Ideally, each new file that's output would include the double-asterisk record AND all blank traymark_ records that follow, until the next double-asterisk traymark_ record, which would output a new file. Is there a way to append the code above, or should I be using a different code? Thanks! Quote
Dan Korn Posted May 15, 2019 Posted May 15, 2019 Change the first line to: if (Field("traymark_") == "**") Quote
Stack Posted May 15, 2019 Author Posted May 15, 2019 Thanks for the reply Dan, works perfectly! Quote
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.