Validation and Visibility Active Form Flows
  • 10 Mar 2022
  • 3 Minutes to read
  • Dark
    Light

Validation and Visibility Active Form Flows

  • Dark
    Light

Overview 

The most common use cases of Active Form Flows involve either validating data to ensure accuracy before submission or hiding/show Form controls to dynamically populate a Form depending on the end user's selection. 

The following article details how to configure an Active Form Flow for validation and visibility purposes.


Validation

  1. In a Designer Folder, create a Flow and add a Show Form step to create a new Form in the Flow. It will automatically open in the Form Designer.
  2. In a Form, add a Textbox with a Label named 'Validate'.
  3. Navigate to Form Properties > Form Rules > Active Form Flows. Select ADD.

  4. In the Add Active Form Flows dialog, name the Rule Flow then select EDIT RULE FLOW.
  5. In the Rule Flow Designer, add a Text Contains Rule step from the Designer Entities > Rules > System Defaults > Default Form Validation Rules category after the Start step.
  6. With the Text Contains Rule step selected, navigate to Properties > Inputs.

    For the contains String input, change the mapping type Constant. Enter 'ABCD'. For the string Value input, change the mapping type to Select From Flow and choose Form Data > Validate Text Box > Value.

  7. On the False outcome path on the Text Contains Rule step, add a Set Validations step from the Form Rules category in the Toolbox. 
  8. With the Set Validations step selected, navigate to the Properties panel.

    Under Inputs > Form Control, change the mapping type to Select From Flow and choose Form Data > Validate Text Box. Under Inputs > Validation Issues, change the mapping type to Constant then select ADD. 
  9. In the Add Value dialog, change the BreakLevel to Fatal. Type a Message that will appear users trigger the validation error then select OK.

  10. On the True outcome path from the Run Rule step, add a Clear All Validations step from the Form Rules category in the Toolbox.
  11. Connect all outcome paths to the End step. Save and close the Rule Flow Designer.

  12. Save and exit the Active Form Flow Designer to return back to the Add Active Form Flows dialog.
  13. Under Advanced > Triggers, set 'Validate [Textbox]' to trigger on StoppedTyping. For Run For Outcomes, select the 'Submit' outcome.
  14. Select OK to return to the Form Designer. Save and exit the Flow Designer.

  15. Save and exit the Form Designer to return to the Flow Designer of the parent Flow.

Debug

  1. Select the Debug Action in the orange Action Bar.
  2. Select START DEBUGGING.

The created validation Active Form Flow will now check if the Textbox contains the specified 'ABCD' string value each time typing occurs within. If the value does not match this, the validation error occurs preventing submission down the specified outcome path. 

Once 'ABCD' is entered, the validation issue resolves thus allowing Form submission.



Visibility

  1. In a Designer Folder, create a Flow and add a Show Form step to create a new Form in the Flow. It will automatically open in the Form Designer.
  2. Add a Checkbox. a Label, and a Button to the Form.
  3. Navigate to Form Properties > Form Rules > Active Form Flows. Select ADD.

  4. In the Active Form Flows dialog, name the Rule Flow and then select EDIT RULE FLOW.
  5. In the Rule Flow Designer, add a Value is True Rule step from the Designer Entities > Rules > System Defaults > Default Form Validation Rules category.
  6. With the Value is True rule step selected, navigate to Properties > Inputs. Under Inputs > Value, select EDIT and choose Form Data > Visibility Check Box > Value.

  7. On the False outcome path, add a Show Control step from the Form Rules category in the Toolbox. Connect it to the End step. 
  8. With the Show Control step selected, navigate to the Properties panel. Under Inputs > Form Control, select EDIT and choose Form Data > [NameOfLabelToShow]

  9. On the True outcome path, add a Hide Control step from the Form Rules category in the Toolbox. Connect it to the End step.
  10. With the Hide Control step selected, navigate to the Properties panel. Under Inputs > Form Control, select EDIT and choose Form Data > [NameOfLabelToHide].

  11. Save and exit the Active Forms Flow Designer to return to the Add Active Form Flows dialog.
  12. Under ADVANCED > Triggers, set Visibility [CheckBox] to trigger on ValueChanged. For Run For Outcomes, select the Done path. Select OK.

  13. Save and exit the Form Designer to return to the Flow Designer.
  14. Select the Form and change its Toggle Visibility input to Ignore.

Debug

  1. Select the Debug Action in the orange Action Bar of the Flow Designer.
  2. Select START DEBUGGING.

The created visibility Active Form Flow checks if the checkbox is set to True. If so, it hides the specified control aka the Label.


For further information on Forms, visit the Decisions Forum.

Was this article helpful?