Systematically Increment an Alphanumeric-Based String | Community
Skip to main content
New Participant
March 9, 2022
Question

Systematically Increment an Alphanumeric-Based String

  • March 9, 2022
  • 1 reply
  • 746 views

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!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

AndyHess
Employee
March 10, 2022

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.

AndyEg1Author
New Participant
March 10, 2022

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