Jump to content

Issue with OpenNewOutputFile


Recommended Posts

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!

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...