Conditional Rule Documentation

The following outlines how to configure and utilize conditional rules within your form components

Falk87gl7c4W000008PXY1
utility:component_customization
Show or Hide fields and Sections via Conditional Logic.
Conditional Rules

Conditional Rules

Configure conditional rules to use within form sections and fields


Conditional Rules dynamically show or hide fields and/or sections based on a Users input. Rules allow admins to define the logic that must return as true for the rule to be enforced. Fields and/or Sections can share rules; there is no need to duplicate rule logic for each field or section. Each form component contains its own set of rules. The Conditional Rules tab manages the rules.

Because form components are interoperable, condition fields need not be configured within the related form component to trigger. Instead, fields can prefill within a flow, or another screen component can link to this component that includes the related fields when applicable.


form builder (conditional rules).png

Falk87gl7c4W000008PXY1

1) Create a New Conditional Rule

create new conditional rules to be used within form sections and fields


From within the Conditional Rules tab, click on the "New Rule" button in the top right corner of the tab window. This action will insert a new rule at the bottom of the list with a default Label set to "New Conditional Rule."


form builder (New Conditional Rule).png


New Conditional Rule Configuration

  • Label: Update the rules Label value to a name that represents what the rules logic is calculating—the rules Label within section and field selectors as a picklist option.


  • Condition Type: Rules can require multiple conditions or fields. The Condition Type selector determines if all states should return true or if any conditions return true.
    • All Conditions Are Met (AND): When selected, all conditions must return true for the rule to be enforced.
    • Any Condition Is Met (OR): When selected, the rule will be enforced if any condition returns true.
    • Custom Logic Is Met: When selected, a Custom Logic input field will be displayed for custom logic to be defined. Custom logic must utilize AND(), OR(), NOT() functions with commas separating conditions. For example AND(1, 2, 3, OR(4, 5, 6, NOT(7))).


Add Conditions to Rule

  • Add Condition: Click the "Add Condition" button to configure and add new conditions to the rule. Only fields configured for the form components related object are available to use within conditions. Optionally include User. Language and/or User. Guest to dynamically display field and section visibility based on the User's Language or if the User is an unauthenticated guest.

Falk87gl7c4W000008PXY1

2) Apply Conditional Rules

Conditional Rules can apply to sections or section fields.


Section Display Condition

Within a section, click the Section Display Condition accordion button to configure when a section should be displayed.


form builder (Section Display Condition).png


  • Display Conditional Rule: this selector displays options for all rules configured for the related component. New sections have a default value of "Always Visible." Select "Always Visible" to always display the section. To dynamically show or hide a section select the rule that should apply.


  • Display Type: this selector defines what should happen if the calculated rule returns true/ valid.
    • Show when conditions are met:  when this option is selected, the section will only be visible if the calculated rule returns true/valid.
    • Hide when conditions are met: when this option is selected, the section will default to visible but change to hidden if the calculated rule returns true/valid.


Field Display Condition

Configure a field's display conditions within the related fields configuration accordion under the section titled "Field Display Condition." Fields can be displayed or hidden just like sections; however, you can also adjust fields to be required or disabled based on conditional rule calculations.


form builder (Fields Display Condition).png

  • Display Conditional Rule: this selector displays options for all rules configured for the related component. New fields have a default value of "Always Visible." Select "Always Visible" to always display the field. Next, select the rule that should apply to show or hide a field dynamically.


  • Display Type: this selector defines what should happen if the calculated rule returns true/valid.
    • Show when conditions are met: when this option is selected, the field will only be visible if the calculated rule returns true/valid.
    • Hide when conditions are met: when this option is selected, the field will default to visible but change to hidden if the calculated rule returns true/valid.
    • Require when conditions are met: when this option is selected, the field will be marked as required if the calculated rule returns true/valid.
    • Disable when conditions are met: when this option is selected, the field will be disabled if the calculated rule returns true/valid.

Logo2png

Conditional Rule Section Demo

below is an example for how conditional rules can be used with form sections

demo_show_hide_sections
utility:hide
this component demos conditional rules that show and hide sections
Controlling Section
No input rendered: Field "Amount__c" not found in response.
No input rendered: Field "Picklist_Short__c" not found in response.

Conditional Rule Field Demo

below are examples for how conditional rules can be used with form fields

demo_show_hide_email_and_phone
utility:call
this component demos conditional rules that toggle phone and email fields
Contact Information
No input rendered: Field "Preferred_Email__c" not found in response.
No input rendered: Field "Preferred_Phone__c" not found in response.