Validation and Visibility Active Form Flows
  • 14 Jul 2022
  • 2 Minutes to read
  • Dark
    Light

Validation and Visibility Active Form Flows

  • Dark
    Light

Article Summary

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.


Validation

  1. In a Designer Project, click CREATE FLOW to create a new Flow.
  2. From the Toolbox panel, attach a Show Form step to the Start step. On the Properties panel, click PICK OR CREATE FORM and select CREATE to create a new Form.
  3. In the Form Designer, add a Textbox control (Validate).
  4. Under the FORM RULES category on the Properties panel, click ADD under Active Form Flows. 
  5. In the Active Form Flows dialog, name the Rule Flow and select EDIT RULE FLOW.
  6. In the Rule Flow Designer, click the Start step and navigate to All Steps [Catalog] > Designer Entities > Rules > System Defaults > Default Form Validation Rules and select the Text Contains step. Click ADD. 
  7. On the Properties panel under the INPUT category, enter "ABCD" for the contains String field. For the string Value input, click PICK. Select Form Data > Validate [TextBox] > Value. Click DONE.
  8. On the False outcome path on the Text Contains Rule step, add a Set Validations step from the FORM RULES category in the Toolbox. On the Properties panel, click PICK for the Form Control field and select Form Data > Validate [TextBox]. Click DONE. 
  9. Set the mapping of Validation Issues to Constant and click ADD. In the Add Value dialog, change the BreakLevel to Fatal. Enter a message and click OK.
  10. On the True outcome path, add a Clear All Validations step from the FORM RULES category in the Toolbox. Connect all outcome paths to the End step. Click Save and close the Rule Flow Designer.
  11. Under the ADVANCED category under the Triggers field, set Validate [Textbox] to StoppedTyping. For Run For Outcomes, select the Submit outcome and select OK. Click Save and close the Form Designer. 
  12. Connect the Form to the End step. Set the Validate field to Ignore. Click Save to save the Flow. 

Debug

  1. Click Debug from the top action bar.
  2. Click START DEBUGGING.
    The created validation Active Form Flow will 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. Select the Form and click EDIT VALIDATION AND VISIBILITY. 
  2. In the Form Designer, add a Check Box control (Visibility) and Label (Hide and Show Label).
  3. Navigate to the FORM RULES category and click ADD under Active Form Flows. 
  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 Toolbox panel under DESIGNER ENTITIES > RULES > SYSTEM DEFAULTS > DEFAULT FORM VALIDATION RULES
  6. On the Properties panel, select Pick under the Value field. Select Form Data > Visibility [Check Box] > Value and click DONE.
  7. On the False outcome path, add a Show Control step from the FORM RULES category. On the Properties panel, click Pick under the Form Control field and select Form Data > Hide and Show [Label].
  8. On the True outcome path, add a Hide Control step. On the Properties panel, set the Form Control field to FormData.HideandShowLabelLabel
  9. Connect all outcome paths to the End step.
  10. Click Save and close the Active Forms Flow Designer.
  11. Under the ADVANCED category under Triggers, set Visibility [CheckBox] to ValueChanged. Select OK. Click Save and close the Form. 
  12. Set the Visibility field to Ignore. Click Save to save changes to the Flow. 

Debug

  1. Click Debug from the top action bar. 
  2. Click START DEBUGGING.
    The 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?