How to Auto Increment Alpha Characters in an expression rule to create sequential ID's

Hello,

I'm looking for a way to automatically increment a set of 4 alpha characters given a rule input of an existing set of 4 characters.

 

For example if the rule is passed AAAA it returns AAAB, if the rule is passed AABA it returns AABB, if the rule is passed ABBZ it returns ABCA, etc.  And finally if the rule is passed ZZZZ it returns AAAA.  Any help on this would be greatly appreciated. Thank you!

 

I've been thinking maybe a constant with an array of the alphabet, an apply that sets a z flag to false at the beginning, checks position 4 for what letter it is using a wherecontains() and increment it by one, if Z set it to A and set z flag to true, then move on to position 3 ONLY when Z flag was true, run through same loop until z flag is false at the check. using choose() to tell it what letter to set to next.

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data