Previous Topic: Modifying the First Part of the Wizard

Next Topic: Updating the Shared Data

Adding a Field to a Variable

Adding fields to variables is equivalent to declaring variables in many programming languages. You cannot reference a field in an action diagram until you add it to one or more variables.

To add the Project ID field to the SharedData variable:

  1. Open the function Project.Add Project.
  2. Click Cancel on the Select Edit Point dialog.
  3. In the Variable Palette, expand the Local variable group, and then select the SharedData variable:

    Adding a Field to a Variable (1)

    Adding a Field to a Variable (2)

  4. Set the Object Browser to display fields.
  5. Drag the Project ID field from the Object Browser onto the SharedData variable in the Variable Palette.
  6. Expand the SharedData variable:

    Adding a Field to a Variable (3)

    Refresh and notice that the variable now contains the Project ID field. This adds the following triples to the model:

     Project.Add Project local Project ID
                        ...for UIBASIC/SharedData
    

    The Project ID could have been added to the SharedData variable by entering these triples in the Model Editor using drag and drop in the Variable Palette. The result is the same whichever method you use.

  7. Keep the Action Diagrammer open for the next section.