Hi,
I am curious. I have a variable XXX C0006A. Is it possible to resubmit the variable and change the A to B, XXX C0006B in a flow?
Then Change to a C if required.
Thank you both for the assistance
concat(
slice('XXX C0006A', 0 , -1),
chunk('ABCDEFGHIJKLMNOPQRSTUVWXYZ', 1)[
add(indexOf('ABCDEFGHIJKLMNOPQRSTUVWXYZ', last('XXX C0006A')), 1)
]
)
Thank you for the reply. I would not anticipate that it would get to Z, in the case of the actual flow. I will give this a try.
A few questions.
Below is one way to do it.
See full flow below. I'll go into each of the actions. Note that they are all Compose action - I've just renamed them.
The expression I used in the Output is:
concat(
substring(outputs('Input'), 0, sub(length(outputs('Input')), 1)),
substring(outputs('AZ'), add(indexOf(outputs('AZ'), last(outputs('Input'))), 1), 1)
)
Note that in AZ I added A at the end so if the code ends with Z it will be set as A. Not sure what you would want to do in your scenario.
Hi @fchopo
thank you for the reply. I was thinking more changing the letter dynamically i.e. if the variable contains XXX C0006A, then it would automatically change to XXX C0006B, without any hardcoding.
Hi @Skybluekid
You could use the following expression:
replace(outputs('compose'),last(outputs('compose')),'B')
Hope that helps!
Ferran