Set a variable at runtime
You can set a variable at runtime by pushing a value to context. This article explains how.
To set a variable value at runtime:
- Make sure the execution has finished or is running and on a breakpoint.
- If the execution is not on a breakpoint, add a breakpoint: Click the circle to the left of a test step and then wait until the test has reached that step and paused.
- In the browser, click the string you would like to save as a variable value.
- On the quick action menu, click the disk icon to push the value to context.
- In the Add Flow Element dialog box, enter the variable name. Use only regular characters, without spaces.
- Select the transformation type:
- None to keep the value as copied
- Numbers to keep the numerical value and strip off any other characters
- Number as String for email content starts with a 0 (zero)
- Click ADD.