Jump to content

Chunking files?


Recommended Posts

This seems simple, but it doesn't seem to work. I've got a file with a field that contains different sites. The datafile has been sorted by the Site Field so all the same sites are grouped in the data file.


Next I created a callback rule "OnRecordStart" and used the following code:

if (FieldChanged(Field("Site")) == "true")

FusionPro.Composition.OpenNewOutputFile(Field("Site") + "." + FusionPro.Composition.outputFormatExtension);


My intent was to create a pdf for every site that contained all the records for that site, but alas, I'm getting just one pdf with all the records. There are no other rules in this job currently and the check box "Output to Multiple files" is un-checked when composing.


Any help on what I'm missing here? Tks.

Link to comment
Share on other sites

I believe that "FieldChanged" takes the name of a field (in your case "Site") as its parameter rather than the actual value of the field.


Try this:

if (FieldChanged("Site"))
FusionPro.Composition.OpenNewOutputFile(Field("Site") + "." + FusionPro.Composition.outputFormatExtension);

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...