RPA Express - Increase numeric value of a variable by 1

Hello,
Could you please help me find a solution to the following question. I need to store a numeric value in a string variable and increase it by 1 on each iteration of the loop. Is it possible to do it in RPA Express, and if yes, then what actions should I use?

Hi @yuliya_harshJZ.

You can initiate the number into a string variable. Then use Number Format action (under Variables) to convert the string variable contents and store into a number variable. You will use the Expression action to increment the number variable as needed.

I have attached a code example for you to look at: Num_string_incrementing.zip (868 Bytes)

The output in this example is as follows:

image

Hope this helps :slight_smile:

1 Like

Hi @athos.whittington
Thank you for the answer. Yes, it worked for my purposes perfectly.

Is there a way of achieving the same but with letters. A, b, c, d and so on. Instead of incrementing numerically?

1 Like

Hi @enzo

You could store the letters in a list variable (for example, ${letters}) and use index to iterate through it in the loop: ${letters[${counter}]}

At the end of the loop, increment the index by 1 as @athos.whittington shared above