Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scripted variables is javascript that is executed and assigned to a variable to use anywhere Variables in JavaScript allow you to execute and assign values to variables that can be used in your web action config, such as . This can be used in the post body, the url ie by its name in mustache syntax.
Usage: URL, and anywhere in your config using Mustache syntax ({{ variable-name }}).

Creata a Javascript variable

  1. Click Go to the Variabels Variables tab

  2. Choose Toggle to Javascript variables on the toggle

  3. Click the "Add" button

  4. Click Rename the variable in the "MyVar" field and rename the variable

  5. Write the your script in the script field. More info below regarding usage"Script" field

Script usage

The script must return a value, this value is assigned to the variable name and used in the configuration by entering mustache syntax.

...