Hello Experts,
I am trying to build a flow that autogenerates an incremental string code as per the last code used.
For example:
Let's say I have a record with a code RAA, then the next code that should be generated for the new record is RAB and after RAC -> RAD.. so on until it reaches RZZ.
If the last code is RZZ then the generated string code should start with S Series that means SAA, SAB ->SAZ.. SAZ, SBZ, SCZ ->SZZ.
So the logic is first to check on the last character what was the letter and what's coming after it.
Secondly, when the last character is Z the flow should start to check on the second character and apply the same logic as the first one.
Finally, when the last and second characters are ZZ it should start with another series.
Here is a screenshot of what I was trying to do but still struggling:

Can someone please explain it in detail and provide me examples to help me achieve this scenario?
Any help will be greatly appreciated.