July 3, 201411 yr Is it possible to use the set variable script step more than once in the same script? I'm firstly using it to determine the number of pages in a report header ( 1 of 4, 2 of 4 etc) and then I want to use it again further down the script to name and save the report as pdf. If there isn't a way to do this in the same script are there any other ways please?
July 3, 201411 yr Is it possible to use the set variable script step more than once in the same script? As many as you like. Note that if you use the step again with the same variable name and repetition, you will modify the existing variable's value. Otherwise you will create a new, independent variable.
July 3, 201411 yr Author Thanks Comment, the variables were named differently. The issue was that after the first variable was used to determine the number of pages on the report, I had a pause/resume script step. Clicking continue undid the work that the variable had undertaken, that led to my original question regarding using mutliple set variable steps in the same script. Removing the pause/resume script step solved the problem.
July 3, 201411 yr Clicking continue undid the work that the variable had undertaken Not sure what that means. A variable does not undertake any work; it holds a value for you. In the case of a script $variable, it will hold it until the script exits, regardless of any intervening pauses. In the case of a global $$variable, it will hold it until you close the file.
July 3, 201411 yr Author Not sure what that means. A variable does not undertake any work Sorry, that's just my loose terminology.
July 3, 201411 yr Terminology aside, the point is that pausing the script should not affect your variables. If it does, then you have a problem unrelated to anything discussed so far. Removing the pause script step may have removed the problem, or merely hidden it.
July 3, 201411 yr Author Terminology aside, the point is that pausing the script should not affect your variables. If it does, then you have a problem unrelated to anything discussed so far. Removing the pause script step may have removed the problem, or merely hidden it. Removing the pause script step did solve the problem. Based on your reply stating that it shouldn't have any effect, I reinstated the pause script step and this time it worked just fine.
Create an account or sign in to comment