JavaScript Functions > Alphabetical Listing of Utility Functions (lr) > lr.advanceParam

lr.advanceParam

Advances to the next available parameter value.

Example String and Parameter Functions

Syntax

lr.advanceParam( param );

Arguments

Argument Comments
param The name of the parameter in quotes (no brackets).

The lr.advanceParam function causes the script to use the next available value of the parameter. If you are running multiple iterations, you can specify in the parameter properties to advance automatically to the next value for each iteration. Use this function within an iteration to advance to the next value.

The effect on other parameters in the same data file depends on the settings in the Vuser parameter list dialog. See the C language example: Example: lr_advance_param.

Return Values

Not applicable

Parameterization

Parameterization is not applicable to this function.

Example

 

function Action(){
   lr.outputMessage("Iteration "+ 
      lr.evalString("{Iteration}") + 
      ", Param1 "+ lr.evalString("{Param1}") + 
      ", Param1 "+lr.evalString("{Param2}"));

   lr.advanceParam("Param1");


    lr.outputMessage("Iteration "+ lr.evalString("{Iteration}") + 
       ", Param1 "+ lr.evalString("{Param1}") + 
       ", Param1 "+lr.evalString("{Param2}"));

return 0;
}