MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (
-   FusionPro® VDP Creator (
-   -   Issue with OpenNewOutputFile (

Stack May 15th, 2019 06:42 AM

Issue with OpenNewOutputFile
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!

Dan Korn May 15th, 2019 12:07 PM

Re: Issue with OpenNewOutputFile
Change the first line to:

if (Field("traymark_") == "**")

Stack May 15th, 2019 12:21 PM

Re: Issue with OpenNewOutputFile
Thanks for the reply Dan, works perfectly!

All times are GMT -7. The time now is 09:40 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.