Yes it is possible. I am guessing you would like your running number to be continuous each time the RPA runs. In that case you would need to save your current running number somewhere, could be a text file. During each run RPA will read the text file and assign the current value to integer (intRunningNumber).
Assign intRunningNumber = intRunningNumber + 1 (if you have a loop then this should be inside the loop so that the running number increments for each item)
Then your subject would have your usual contents and then append the intRunningNumber.
At the end of the run, write back the intRunningNumber to your text file for usage on the next run.
Hello @Alfred_Gan It should continue with the following numbers. I guess there is something wrong with the variable scope. Can you share your variables panel screenshot (something like below one)at where the case number is defined
If you initialise your CaseNumber variable in your code as 001, then every time the process runs it will start from 001. In order to have some persistence between executions you need to store the value of this counter somewhere else.
You could do this in many places, a text file, a spreadsheet, a storage bucket etc… where is up to you, so long as it’s somewhere that persists between runs. To keep things simple, maybe just start with a text file containing your initial value 1.
Your code could read the text file and assign the value of the text file to your CaseNumber variable. So the first time, this would be 1.
Then for each email, increment your CaseNumber variable as you go, but write the updated CaseNumber value back to your text file. So after the first email, your text file will now contain 2, then 3, and so on and so forth.
This way, whenever your code runs, it will get the CaseNumber value from your text file, which should contain whatever the last CaseNumber was when your code last ran.