Fletch Posted February 5, 2013 Share Posted February 5, 2013 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? Quote Link to comment Share on other sites More sharing options...
esmith Posted February 5, 2013 Share Posted February 5, 2013 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); } Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted February 5, 2013 Share Posted February 5, 2013 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); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.