lasdoog Posted January 10, 2020 Share Posted January 10, 2020 Hi, 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. Example: 1-40 50-90 100-140 150-190 200-240 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! Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted January 13, 2020 Share Posted January 13, 2020 Something like this: var nums = []; var num = 0; for (var i = 1; i <= 5000; i++) { num++; if (num % 50 > 40) num += 9; nums.push(num); } 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. Quote Link to comment Share on other sites More sharing options...
lasdoog Posted January 24, 2020 Author Share Posted January 24, 2020 Thanks Dan! It's beautiful. 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.