- 28 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Establishing Constant Data (Global Variables)
- Updated on 28 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Overview
The Portal provides the ability to store constant values for reuse inflows. 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. Arrays are not supported in constant data.
Example
This example creates a system constant for a "From" email address. Navigate to System > Designers > Lookup Lists And Constants. Select Add Defined Constant.
Configure the Edit Flow Constant dialog as follows:
Flow Constant Name - The name for the constant that will appear in the Flow Designer, available for selection.
Flow Constant Description - A description for using the constant value.
Flow Constant Type - The data type of the constant value.
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
Under Location, there is List Name and List Category Name. These both are used for organizational purposes, the List Name will display alongside Flow Data and System Constants within the Data Explorer. TheList Category Name is displayed under the List Name, multiple Category names can belong to one List Name.
Select Save Constants to save.
Now, in the Flow Designer, notice the new category available for specifying input data.
From the Start step add a Send Email Step from Communication in the Steps Panel. Connect the Send Email step to the End Step. Double-Click the Send Email step to configure it. Under From select From Email Address from flow. Type a valid email address in the To section, give the email a Subject and Body.
Save the flow and select Debug in the top Actions Panel. The flow runs successfully. The email is received, the from address is the address that was defined in the Edit Flow Constant dialog.