Formating a variable

Hello all
In my automation, there is a string like this:
“VELAVERDE_VIAVE_20210512_0001_0001”

1)This is the client (“VELAVERDE_VIAVE”), and i’ve already a variable for it;
2) Then the date (“20210512”), another variable (Now.toString(“yyyyMMdd”);
3)Then the production reference (“0001”) - i’ve used ("****") in the selctor…
4) and here is my problem…the last part of the string (“0001”) is the order…it works like a counter…it starts at 0001 and can go to 9999.
How can i put it in a variable? When the RPA processes this one the next order is (“0002”) always with this format.
Help would be appreciated.

@Jose_Pedro_Mendes
Welcome to the forum

PadLeft will help us:
grafik

3 Likes

Ok, but how can i increment it, as if it was a counter?

@Jose_Pedro_Mendes
grafik
Line1: cnt ist counter and Int32
Line2: cnt filled up
Line3: cnt + 1 filled up
Line4: Counter is a string
Line5: Counter String is parsed to int , increased and filled up

Thanks a lot !!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.