Establishing Constant Data (Global Variables)
  • 03 Feb 2021
  • 2 Minutes to read
  • Dark
    Light

Establishing Constant Data (Global Variables)

  • Dark
    Light

Article Summary

Overview

The Portal provides the ability to store Constant Values for reuse in Flows. This is a way of creating "global data." It is useful because when a change is needed, the Data itself is updated in one place rather than within each Flow that uses the Data. For example, use Constant Data for a corporate Address, a customer service Phone Number, or a standard "From" Email Address to use in Send Email steps. The following example demonstrates how to create a System Constant for a "From" Email Address.

Noote
Arrays are not supported in Constant Data.
Note
Decisions will not allow Designers to Create/Edit/Delete Flow Constants via Service Calls or steps.  Explore using a Custom Data Structure if this is a requirement.



Example

  1. Navigate to System > Designers > Lookup Lists And Constants.
  2. Select the ADD DEFINED CONSTANT button from the top Action bar.
  3. From the Add Defined Constant window, provide the Flow Constant Name, "From Email Address," then configure the Defined Constantas follows: 
    1. Under LOCATION, set the List Name value to "Email Address" and the List Category Name to "Email Attributes." 
      In LOCATION, the List Name should refer to the name of the Project that the Constant is affiliated with, and List Category Name represents the organizational body for the List. 
    2. Under VALUE, select String from the Flow Constant Type dropdown menu; then, input the desired String Value.
      The Flow Constant Type dropdown is used to determine the Data Type of the Constant value.
      Other available selections include:

      • String - a string value

      • Rich String - a string but with formatting available

      • Int - an integer value

      • Decimal - a decimal value

      • Boolean - a boolean (true/false) value


    3. Click SAVE.

      Selecting SAVE, saves the Define Constant to the Lookup Lists and Constants Folder.  

      Alternately, the Constant Data value along with its List Name and List Category can be viewed via the Data Explorer tab of the Flow Designer. 




Debug

  1. Navigate to a Designer Project and select CREATE FLOW from the top Action bar; select Flow, provide a Name, then click CREATE.

  2. Connect a Send Email step from the FAVORITE STEPS category of the Toolbox tab, to the Start and End steps.

  3. Navigate to the Send Email step's Properties tab by selecting it. 

  4. Click Edit Input Mappings.

  5. Expand Email Addresses > Email Attributes, then map the From Email Address value to the From Input.

    1. Map the rest of the values accordingly, then click OK.

  6. Save the Flow, then close via X, if desired.

  7. From the Flow Designer, click Debug, then click START DEBUGGING.

  8. After the Flow runs, view the Input/Output Data for the Send Email step.

    The input From value will be replaced by the "From Email Address" Defined Constant. 




Was this article helpful?