Send Us Your Feedback

AXURE 202 - Article 5: Variables

Overview

    1. Variables Demo
    2. Variables
    3. Managing Variables
    4. Setting Variable Values
    5. Using Variables in Conditions
    6. Using Variables When Setting Text



1. Variables Demo

Please turn on speakers for audio
To view in HD on Vimeo, please click here.



2. Variables

Variables are used to store and pass data that persists from page to page as you click through the prototype.

In Axure RP, you can use up to 25 variables in a file. The variables can be set in interactions and used in interaction case conditions.


3. Managing Variables

Variables can be created, removed, renamed, and reordered in the Manage Variables dialog. To open the dialog, select Wireframe->Manage Variables in the main menu.

By default, a variable named OnLoadVariable is created in each file. New variable names must be alphanumeric, less than 25 characters, and contain no spaces.



4. Setting Variable Values

Variable values can be set in the Interactions Case Properties dialog by selecting the action "Set Variable and Widget Value(s) equal to Value(s)". Clicking on the "Variable and Widget value equal to Value" link in the Actions description opens the Set Variable and Widget Values dialog.


In the Set Variable and Widget Values dialog, you can construct actions like "Set value of variable OnLoadVariable equal to 'loggedin'".


5. Using Variables in Conditions

Variables can also be used in conditions constructed in the Condition Builder dialog.


You can build conditions like "if value of variable OnLoadVariable equals 'loggedin'".


6. Using Variables When Setting Text

Variable values can be inserted into text panels when setting text using the "Set Variable and Widget Value(s) equal to Value(s)" action.

In the Set Variable and Widget Values dialog, when editing a text value for a text panel, you can surround a variable name with "[[" and "]]" to insert the variable value into the text in the prototype. This also works when setting text on other widgets.

For example, you can set the text on a text panel to "Welcome, [[NameVariable]]".