lr.advance_param

Advances to the next available parameter value.

C#

int lr.advance_param( string param );

VB.NET

Function lr.advance_param( ByVal param As String ) as Integer
String and Parameter Functions

Arguments

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

The lr.advance_param 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. For details, see the C version of the function, lr_advance_param.

This function is not recorded—you insert it manually into your script.

Return Values

Returns 0 on success and -1 on failure.

Parameterization

Standard parameterization is not available for this function.

VB.NET Example

The following example tracks a parameter, Stock, and sends three of its values to the output.

lr.output_message("Track Stock: " + lr.eval_string("{Stock}"));

for(int index=0; index<3; index++){

int j = lr.advance_param("Stock");

lr.output_message("Track Stock: " + lr.eval_string("{Stock}"));

}