Variables

Variables store information during simulation. They can store text, images, or data. You can use variables to transfer information to other screens in your prototypes. For example, you can transfer an email address typed in an Input Text Field, and list that email address on the next screen in a Text element.

Look to the Variables palette and click the ‘+’ icon to create a new variable in your prototype.
Add new variable
The value of a variable is defined using Events. To add an event, select the UI element you wish to start the interaction (i.e. a ‘Submit’ button), go to the Events palette and click “Add event”. You’ll then see the Events dialog, where you can specify the event. Click here to learn more about events.
add event

Give a variable a value

Once you’ve opened the Events dialog, follow these steps to learn how to give a variable a value:
Give a variable a value

  1. Create an event with a starting trigger (e.g. On Click, On Focus Out, On Page Unload).
  2. Choose a Set Value action.
  3. Select the Variables radio button. This will display the list of variables in your prototype. Click the ‘+’ icon to create a new variable if you don’t already have one.
  4. Choose the variable to set the value to.
  5. Specify the value of the variable. This can be a fixed value, such as a number or word.
  6. To give a variable a dynamic value, such as those entered in Input Text Field elements during simulation, click the “Calculated” radio button, the “Add expression” text, and create your expression.

Give an element the value of a variable

Once you’ve opened the Events dialog, follow these steps to learn how to give an element a variable’s value:

Give an element a variable's value

  1. Create an event with a starting trigger. In most cases, this will be an On Page Load trigger.
  2. Choose a Set Value action.
  3. Select the element as the target of the Set Value action on the Canvas or the Outline in the dialog.
  4. For the value of the Set Value action, click the “Calculated” radio button, the “Add expression” text, and drag the variable into the open space in the expression.