Set parameter
Sets parameters.
When to use?
When we want to store and reuse values.
How to use:
- Select the SCOPE TYPE from the drop-down
- Scope type installation is for the duration of the whole installation and has the longest life span
- Scope type session is for the duration of the session
- Scope type request is for the duration of a single request
- Add parameters you wish to store into the PROPERTIES field, like his: parameterName : ${parameterValue}
- You can access the created parameters like this: ${parameterName}
Example of usage for creating an array
We're going to create a two dimensional array in this format: players[index]["name"]
- SCOPE TYPE:
session
- PROPERTIES:
players[0]["name"] : ${"John"}
players[1]["name"] : ${"Jane"}
- To access an array item:
${players[0]["name"]}
- Note that for cases where you don't know how many items the array is supposed to have, you can use an existing counter parameter when creating it. For example:
PROPERTIES:
players[${counter}]["name"] : ${user.input}