Expand my Community achievements bar.

Come join us for our Coffee Break this WEDNESDAY on top takeaways from Adobe Summit!

Systematically Increment an Alphanumeric-Based String

Avatar

Level 2

I'm currently working on a project that requires incrementing an alphanumeric-based string using Fusion, but I'm struggling to determine how to make this happen using Fusion's text tools. Specifically, I need to read a record with either an ONLY numeric string (e.g. 12345) and append an alpha character at the end (e.g. A), or I need to read that same string with the alpha character at the end, and increment by one letter (e.g. 12345A -> 12345B).

Any ideas or insight is apprecaited!

2 Replies

Avatar

Employee

The answer here lies in splitting the number from the version code. This is easiest done with a Text parser using a regular expression. Then use the Fusion switch() function to select your next variable. The only issue here would be that you would be limited to the number of switch variants built out. Take a look at the attached blueprint export and it will show you all of the regex codes and formulas used. You can play with the input value and see the resulting version code.

0694X00000I96wPQAR.png

Avatar

Level 2

Hi Andy - thanks for all that information! I'll definitely give it a shot and see how it goes. 👍