Setting Required Value For Outcome Path
- 04 Aug 2022
- 1 Minute to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Setting Required Value For Outcome Path
- Updated on 04 Aug 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
This tutorial demonstrates how to set required fields on the Form dynamically. Please review the Creating a Form document to learn about Required and Optional Outcome scenarios. When designing a Form with some user input controls, it can be hard to decide if an input should be required or optional. With this feature, the Flow can decide based on data evaluation before loading the Form.
Example
In this example, build a simple Flow with a Form. The Form will have a text-box control that may be set to be either required or optional. This will be set as a Form input.
- In the Flow Designer, add a Show Form step.
- In the Properties panel, select the Pick or Create Form button.
- Then, navigate to the Create or Pick window and CREATE a new Form.
- In the Form Designer, design the Form with a Button, Label, and Text Box.
- Navigate to the Text Box Properties.
- Enable the Optional Outcome Scenario.
Required Outcome Scenario the user will not be able to submit the Form without providing input Optional Outcome Scenario the user may leave an input empty and be able to submit the Form Not Used the data provided in the input will not be available in the next steps in the Flow - Navigate to the Data section.
- Set the Get required from input data check-box to true.
- Save the Form and close Form Designer.
- In the Flow Designer, select the Show Form step.
- In the Properties panel, the Form has two Inputs.
- The first one is for Text Box; set the mapping type to Ignore.
- The second one is a Boolean variable that defines if the Text Box input should be required or optional. Set the mapping type to Constant and set the Value to ‘True’.
- Connect the outcome of the Show Form step to the End step.
Debug
- Select Debug on the top panel in the Flow Designer
- Attempt to Submit the Form without providing input in the Text-Box.
- Notice a validation issue, and the Form will not be submitted.
- Add text to the Text Box, and the Form will be submitted successfully.
Was this article helpful?