Jump to content

Sequential Numbering with gaps


Recommended Posts




I'm wondering if there is a way to use the a Callback rule to generate a sequence of numbers that has gaps in it.











250-290, etc.



I have a customer who wants numbering that does not contain 41-49 or 91-99 in the number sequence. It seems like you should be able to do this using Callback rule with javascript. Using trim on the last 9 of every group of 50? This probably be 3,000 to 5,000 numbers.



Any suggestions are much appreciated!

Link to comment
Share on other sites

Something like this:

var nums = [];
var num = 0;
for (var i = 1; i <= 5000; i++)
   if (num % 50 > 40)
       num += 9;


return nums[FusionPro.Composition.inputRecordNumber];

This doesn't need a Callback rule; a regular old Text rule will work just fine. Though an optimization would be to put all but the last line of the code above into the JavaScript Globals.

Link to comment
Share on other sites

  • 2 weeks later...

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