Variables

From PresenceWiki
Revision as of 14:32, 28 April 2009 by Mattpryor (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Variables are bits of information or data that are stored in Presence's memory with a special name so that they can be reused throughout a Task.

Each Variable has a name and a value. Variable names always take the following form:

${variableName}

To set a value for a Variable, drag a "Set Variable" node into your Task. In the value field you can specify some text, a number, or you can reference another variable. You can also include the value of a field in the Data Table, or a Function Call.

Variables also have the concept of Scope. This refers to the visibility of the Variable (i.e. where it can be seen). The following Scopes are available:

  • Local: Local variables can only be read within the current Task. Furthermore, they can only be read after they have been set.
  • Task: Task variables, like local variables, can only be read within the current Task. However the difference between them and local variables is that Task variables can be read anywhere in the Task once they have been set.
  • Global: Global Variables can be accessed by any Task once they have been set. Global Variables can either be set in a Task using the Set Variable Node, or through the Administration Client menu (Task > Manage Global Variables).