Fletch Posted April 29, 2016 Share Posted April 29, 2016 I need to create a rule that starts a sequential number sequence. Once it hits 10,000 it needs to restart back to 1 and repeat the sequence. I'm guessing it's a fairly easy JavaScript formula. Maybe not. Any help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
tou Posted April 29, 2016 Share Posted April 29, 2016 create a rule (YOUR RULE NAME) and use the following code. If you sequence number is 10,000 it'll set it to 10,000 due to 0 remainder...... var setA = 10000 var a = FusionPro.Composition.inputRecordNumber%setA if (a==0) a = setA return a Quote Link to comment Share on other sites More sharing options...
step Posted May 2, 2016 Share Posted May 2, 2016 You want to use the modulus operator: return CurrentRecordNumber() % 10000 || 10000; 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.