Using Data Flow In a Form
- 19 Jan 2022
- 2 Minutes to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Using Data Flow In a Form
- Updated on 19 Jan 2022
- 2 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
Decisions has the ability to run additional Flows from a Form. These can be triggered automatically or run based on user interaction. For example, a field on the Form will change based on the user inputs on a different control. The Flow within the Form will run and push data back to the Form. The following example shows the features of Data Flows in a Form.
Example:
Create a Form where the user will input a type date (Month Day, Year) into the Text Box, and the Data Flow will convert the string to a date and appear in the Date Picker.
- In a Designer Folder, select the Create Flow button.
- When the Create Flow dialog appears, select Flow, name the Flow, then select CREATE.
- Select the Done outcome path of the Start step.
- In the Add After dialog, select the Show Form step in the Favorite Steps category. Select ADD.
- With the Show Form step selected, in the Properties panel, select PICK OR CREATE FORM.
- Select CREATE under Create New. Choose Form, name the Form, and select CREATE.
- The Form has one Button (Done), Two Labels (Date as String, Date From String), one Text Box (Date as String), and finally, one Date Time Pickers (Date From String).
- Select the workspace. In the Properties panel, navigate to the FORM RULES section and expand Legacy. Under Data Flows, select ADD NEW.
- The Add Data Flows dialog will appear. Name the Flow Data, “Convert Text To Date”.
- Select PICK FLOW.
- In the Create or Pick dialog, select CREATE. Select Form Data Flow.
- Name the Flow, select CREATE.
- Select the Done outcome path of the Start step.
- In the Add After dialog, search for and choose the Convert String to Date step. Select ADD.
- Connect the Done outcome path to the End step.
- Select the Start step. In the Properties panel, under Flow Inputs, select SHOW EDITOR.
- In the Data Definitions dialog, type DateAsString and leave the Type as String.
- Select CLOSE to save and close.
- Select the Convert String to Date step in the workspace.
- Under Inputs > String to Convert, select Pick.
- In the Pick Data for Input dialog, choose Date As String, select DONE. Notice under the Outputs section, the mapping type is set to Rename, and the Name is Converted Date.
- Select the End step, under Data > Pick From Current Data select Converted Date.
- Save and close the Data Flow.
- In the Add Data Flows dialog, select UPDATE INPUTS.
- Under Flow Inputs, select the pencil icon next to DateAsString. Change the Input Type to Form Control. Under Form Data Name, select the Date as String Textbox. Select OK.
- Under Flow Outputs, select the pencil icon next to Flow: Converted Date.
- Select Refresh all the components listening to this data name. Select OK.
- In the Add Data Flows dialog, select OK.
- On the Form, select the Date Time Picker. In the Properties panel, navigate to Common Properties > Data Name and select PICK FROM DATA.
- In the Pick Data dialog, choose Flow: Converted Date, select PICK.
- Save and Close the Form Designer.
Debug
- In the Flow Designer, select Debug on the top panel.
- The Debugger will appear; select the START DEBUGGING in the middle of the screen to initiate the Debugger.
- The Form will appear, allowing users to type a date, and the Date As String date picker will change on value change.
Was this article helpful?