Establishing Constant Data (Global Variables)
  • 03 Oct 2023
  • 1 Minute to read
  • Dark
    Light

Establishing Constant Data (Global Variables)

  • Dark
    Light

Article summary

Overview

Decisions provide the ability to store constant values that can be reused in Flows called Global Variables. These are useful when the same data value needs to be changed in multiple places. The data itself is updated in one place rather than within each Flow that uses the data. For example, a user may use a global variable constant for a corporate address, a customer service phone number, or a standard email address in the Send Email steps. 

Decisions does not allow users to create, edit, or delete Flow constants via service calls or steps. If this is a business requirement, see Custom Data Structure.

Example

The following example demonstrates creating a global variable used in the From field for an email address.

  1. Navigate to System > Designers > Lookup Lists And Constants in the Decisions Studio. Click ADD DEFINED CONSTANT from the Global Action Bar.


  2. From the Add Defined Constant window, enter "From Email Address" for the Flow Constant Name
  3. Under the LOCATION category, enter "Email Address" in the List Name field and "Email Attributes" in the List Category Name field.  
    The List Name should refer to the name of the Project with which the Constant is affiliated. List Category Name represents the organizational body for the list. 
  4. Under the VALUE category, select Flow Constant Type and enter an appropriate String Value (admin@decisionscom). Arrays are not supported as constant data. Click SAVE. 
    Flow Constant TypeDescription
    PasswordMasked String value
    StringString value
    Rich StringString value with available formatting
    IntInteger value
    DecimalDecimal value
    BooleanBoolean (true/false) value
    String ListList of Strings value


  5. Click CREATE FLOW from the Global Action Bar in a Designer Project and select Flow. Provide a Name and click CREATE.
  6. Click the Done path of the Start step and select the Show PopUp step. Click ADD.

  7. In the Subject field, enter "Constant Data Value:" on the Properties panel. Click Unknown next to the Message field and select Select From Flow. Click Email Addresses > Email Attributes and select From Email Address. Click DONE.
  8. Connect the Done path to the End step. Click Save to save changes to the Flow.

Debug

  1. On the top action bar, click Debug. Click START DEBUGGING.
  2. After the debugger runs, the popup will display the subject and the email address from the Defined Constant.

Feature Changes

DescriptionVersionDeveloper Task
Adding a String List Option to the System Constants
8.14[DT-030804] 
For further information on Flows, visit the Decisions Forum.

Was this article helpful?