Assigning Global Variables in Events

To make a data element available to use as input or output at any point in your application, assign it to a global variable. When you assign variables as part of an event, that variable won't have the value you specified until the event has been run. You can also assign global variables through the Screen Binding editor. Variables assigned in this manner will have the specified value as soon as the bound screen is processed (an action occurs on that form causing it to be submitted to the run-time service).

To assign a data element to a global variable
  1. Create an event, and add an Assignment action to it.

  2. From the Assignment Properties pane, click the Assign Global Variables button.

    The Assign Global Variables dialog box appears, showing the eligible data on the left, and the available Global Variables on the right.

  3. Map the data element to a new or existing global variable.
    Do this
    Create a new global variable
    • Under Eligible Data, right-click the data element you want to map to a new variable, and choose Assign New Global Variable.


      Right-click the Global Variables node, choose New, and then map it by selecting a data element and clicking the Add Mapping button.

    Create a new global variable, and map a constant to it
    1. Under Global Variables, right-click the Global Variables node and choose New.

    2. Provide a name for the new global variable.

    3. Right-click the global variable you just created, and then choose Map Constant.

    4. Provide the value for the new constant (which will become the value of the global variable when the action is processed).

    Change the value of an existing global variable with the current action
    • Select the data element you want to map to the variable, then select the global variable to which you want to assign the data value.

    • Click the Add Mapping button.

    The eligible data will consist of two client run-time environment variables, IPAddress and UserName, all of the controls on the current form, and any previously defined global variables; the results of other mappings may also be available.

  4. From the Event editor, click OK.

Related Topics
Bullet Adding Events, Overview
Bullet Adding Actions to Events
Bullet Assigning Global Variables from Screen Bindings
Bullet Action Descriptions: Assignment