Jump to content

Output file based on field value


Recommended Posts

Sure. Say I have a job that has a field in my input file that has a value of either "1" or "2" (just for simplicity). I would like to create a rule that composes all records with a value of "2" to a directory. It's ok if they are output as individual pdfs into the directory. Otherwise, if the field value is "1", output the records to the file specified in the "compose" tab. I hope that makes sense. Let me know if i'm speaking nonsense. Thank you in advance for any feedback.
Link to comment
Share on other sites

You could do something as simple as this if you are not using a second external database.

 

//Create OnNewOutputFile Callback rule

vDir = "\\path for your "2" directory\\";

 

//Use your own field name here

if(Field("Type") == "2")

 

FusionPro.Composition.outputFileFullPathName = vDir + Field("Name")+ ".pdf";

else

FusionPro.Composition.outputFileName = Field("Name") + ".pdf";

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...