Forum Discussion

sguda's avatar
sguda
Regular Contributor
15 years ago

How to increment the string by 1 through script.

I have string variable defined in persistant varibales section. Tried to increment the value by 1 by setvariable operation by including the code stringvariable + 1. I don't see it incrementing. Please tell if there a function or method to add availbale or hoe to increment.

2 Replies


  • Hi,





    Use a variable of the Integer type. To increment its value, on the "Set New Value" page of the "Set Variable Value" dialog choose the "Code Expression" mode and set Value to "Project.Variables.YourVariableName + 1" (without quotes). See the attached image for more information.