- 30 Sep 2021
- 2 Minutes to read
- Print
- DarkLight
Displaying Flow Data on Forms
- Updated on 30 Sep 2021
- 2 Minutes to read
- Print
- DarkLight
Overview
This article will cover leveraging 'Flow Data' which is found in the Flow Designer, Rule Designer, and the Form Designer.
Flow Data contains default variables that are made available to users at Design Time. A key characteristic of Flow Data is that it is system-generated data and not user-created data. If there are no custom SDK changes in the Decisions configuration, then Flow Data variables will be the same in every Designer but the data values may be different.
For example, the variable 'CurrentUserEmail' displays the email of the current user, and the value of that variable differs depending on which user is logged into the system. This type of data can be leveraged in many use cases including user context-relevant Forms and Flow Run time calculations.
Example
In this example, a Form will be created that contains 4 'Label', 4 'Textbox', and outcome Button Form Components. After the Form is built, the example will show how to map Flow Data into the 'Textbox' Form controls.
- Begin by navigating to the Designer Folder and clicking the CREATE FLOW button.
- In the Create Flow window, give the Flow a name, then click 'CREATE'.
- In the Flow Designer, drag a 'Show Form' step to the workspace and click Pick or Create Form in the Properties panel.
- In the Create or Pick window, name the Form and click CREATE to navigate to the Form Designer.
- In the Form Designer, drag four Labels [Current User Email, Flow Start Time, FolderId, and Current User Machine Name] with four corresponding Text Boxes, and one outcome Button [Exit] to the Form.
- For each Text Box component, set the outcome scenarios to Optional from the Properties panel > Common Properties section.
- Save and Close the Form.
- In the Flow Designer, connect the Exit outcome path to the End step.
- Navigate to the Properties panel > Inputs and set each Form input to a Select From Flow input mapping.
- In the Pick Data for Input window, drill into Flow Data for the corresponding Form input. Repeat this step for each input.
Debug
- Select Debug from the top action panel, this action will automatically save the Flow.
- In the Debugger, notice the Form is dynamically populated with Flow Data.
Displaying an Uneditable Output
Designers may wish to display fixed data to the end user that automatically fills based on Flow Data or the outputs of steps in the Flow. For example, a Designer wishes to display the end user's name and email based off their account information in the Flow Data that cannot be edited to prevent false information. Alternatively, a Designer may wish to display the solution to a math equation as uneditable to prevent human error.
To achieve this, the Initially Enabled and Is Editable and settings may change a component's data editability. While not every component contains the Is Editable setting, ensure these settings are set to False if present.
The Initially Enabled setting is located in Properties > Behavior.
The Is Editable setting is found in components such as the Currency and Number Boxes under Properties > Setup Data.
Labels
By default, Labels present uneditable String information so no further configuration for this goal is needed.
However, to present the desired information, the Text From Data Name Check Box should be selected. Enter the name of the desired data to display in the Data Name setting exactly as named else the information will fail to display.