Modify Variable Value

This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to replace the value stored in an existing variable with the value of another variable. The execution result is stored in the given dynamic variable.

Syntax

Input Value: <variable whose value needs to be changed>;<new value>

Note: The variable name should be within curly braces {}.

Argument
Description

<variable whose value needs to be changed>

(Required)

Provide the name of the variable whose value you want to modify.

<new value> (Required)

Provide the new value that should replace the existing value of the variable.

Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>(Required);<Dynamic Variable>(Optional)

Both dynamic variables store the status as True or False.

Example: Modifying the Value of an Existing Variable

In this example, we explain how to update the value of an already created variable during execution.

  • Action: Modify Variable Value

  • Input Value: {Username};JohnDoe

    • The first argument ({Username}) specifies the name of the existing dynamic variable to update.

    • The second argument (JhonDoe) specifies the new value that replace the current value of the variable.

  • Output Value: {ModifiedStatus}

    • The action status is stored in this {ModifiedStatus} dynamic variable with the following possible values:

      • True: If the variable value is successfully updated.

      • False: If the update fails because the variable does not exist or the input is invalid.

Note: If the output variable is not defined, the result will be displayed only in the execution logs and not stored in any variable.

Logical Explanation: The Modify Variable Value action takes the value from the Input Value column ({Username};JohnDoe) and updates the existing dynamic variable {Username} with the new value JohnDoe (Old value is Admin). After the update, the action stores the execution result (True) in the {ModifiedStatus} variable.

Last updated

Was this helpful?