Setting Required Value For Outcome Path
  • 27 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Setting Required Value For Outcome Path

  • Dark
    Light

Overview

This tutorial demonstrates how to set required fields on the Form dynamically. With this feature, the Flow automatically decides which data is/is not optional based on data evaluation before loading the Form without the need for Designer input for each field.

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.

  1. In the Flow Designer, add a Show Form step.
  2. In the Form Designer, design the Form with the following controls: Button, Label, and a Text Box.
  3. Navigate to the Text Box Properties.
  4. Define the Outcome Scenarios as 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
  5. Navigate to the Data section. 
  6. Set the Get required from input data check-box to true.
  7. Save the Form and close Form Designer.

  8. In the Flow Designer, select the Show Form step.
  9. In the Properties panel, the Form has two Inputs. The first one is for the Text Box; set the mapping type to Ignore
  10. The second one is a Boolean variable that defines if the Text-Box input as required or optional. Set the mapping type to Constant and set the Value to ‘True’. This selection makes the input required.
  11. Connect the outcome of the Show Form step to the End step.


Debug

  1.  Select Debug on the top panel in the Flow Designer
  2. Attempt to Submit the Form without providing input in the Text-Box. Notice a validation issue, and the Form will not be submitted.
  3. Add text to the Text Box, and the Form will be submitted successfully. 



Was this article helpful?