Ask a Question

How to increment the string by 1 through script.

sguda
Regular Contributor

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 2

RE: How to increment the string by 1 through script.


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.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
sguda
Regular Contributor

RE: How to increment the string by 1 through script.

Thanks, this works.
cancel
Showing results for 
Search instead for 
Did you mean: