Jump to content

Skip a record


Fletch

Recommended Posts

I have a rather large data file. From that file I need to print labels for only some of the records. Each record has a unique identifier number. I know which records need labels based only on the unique identifier. However, those are spread througout the data file. I want to create a rule that I can insert the needed identifiers and have them printed while skipping the rest. Is this possible?
Link to comment
Share on other sites

You could create your label page and set it to unused then add code to your OnRecordStart rule. You would create an array of all the identifiers which need labels, then set the unused page to used for those records when composing.

var needLabels = [23,46,57,58,69,73,81,92,96,98,103,235];
for (var i=0; i<needLabels.length; i++) {
  if (Field("Identifier") == needLabels[i]) FusionPro.Composition.SetBodyPageUsage(label, true);
}

Link to comment
Share on other sites

You could create your label page and set it to unused then add code to your OnRecordStart rule. You would create an array of all the identifiers which need labels, then set the unused page to used for those records when composing.

var needLabels = [23,46,57,58,69,73,81,92,96,98,103,235];
for (var i=0; i<needLabels.length; i++) {
  if (Field("Identifier") == needLabels[i]) FusionPro.Composition.SetBodyPageUsage(label, true);
}

Or, a bit more succinctly:

var needLabels = [23,46,57,58,69,73,81,92,96,98,103,235];
FusionPro.Composition.SetBodyPageUsage("Labels", needLabels.indexOf(Field("Identifier")) > -1);

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.

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