Business Rules

An overview on how to apply logical conditions on the form element fields of a business application.

Business Rule is a statement/condition that imposes limitations on specific aspects in the app's form, such as the elements entered in the field of a particular element field or the characteristics of a given relationship in the element fields.

Create Business Rules

Rule:

A Rule is a prescribed actionable guide to a specific condition in the application. It can have a single condition or multiple conditions.

Rule with Single & Multiple Conditions

Example: In a company, if the employee joins as a experienced person, only then the condition enables the Experience section field and the previous project details section field to fill in the joining application.

  • Click on the Add Rule button.

  • The Add rule section will display to the page.

  • Click on the Name text box and provide a valid name for the rule.

  • Click on the Rule on drop-down, . It contains the list of steps in the workflow.
  • Select the workflow steps on which you want to add the rule.

Note: You will have provision to select multiple workflow steps.

Add a condition to the workflow step

  • Click on the Element drop-down under condition-1. It contains the list of all the elements in the application.
  • Select an element for which you want to add a rule.

  • Once you select an element, Compare Type and Comparison drop-down fields will display alongside.

  • Click on the Compare Type drop-down, It has two options:
a) Compare With Value: Select Compare with Value to compare the element field value that you enter in the application with a value defined by you in the rule.

    b) Compare With Field: Select Compare with Field to compare the element field value with another field value in the application.

    Compare with value

    Select the Compare with Value option. A comparison drop-down will display alongside it. It contains the following options based on the element field type.

    • Contains: This is to compare if the form element field in the app contains the value that is defined by you in the rule. If this condition becomes true then the platform acts accordingly.
    • Not Contains: This is to compare if the form element field in the app does not contain the value that is defined by you in the rule. If this condition becomes true then the platform acts accordingly.
    • Empty: This is to compare if the data in the form element field in an app is empty. If this condition becomes true then the platform acts accordingly.
    • Not Empty: This is to compare if the data in the form element field in an app is not empty. If this condition becomes true then the platform acts accordingly.
    • Equal: This is to compare if the value entered in the form element field in an app is Equal to the value defined by you in the rule.If this condition becomes true then the platform acts accordingly.
    • Not Equal: This is to compare if the value entered in the form element field in an app is Not Equal to the value defined by you in the rule. If this condition becomes true then the platform acts accordingly.
    • Starts With: This is to compare if the value entered in the form element field in the app Starts With the same value as defined in the rule. If this condition becomes true then the platform acts accordingly.
    • Ends With: This is to compare if the value entered in the form element field in the app Ends With the same value as defined in the rule. If this condition becomes true then the platform acts accordingly. In this condition, the drop-down shows two options Equal and Not Equal. Select one option based on your requirement.

    Note: Users can also add multiple conditions in a single business rule and combine them with a AND/OR operator.

    • Add one more condition by click on the + button in the conditions section.

    • An additional condition-2 field will display below the condition-1 field.

    • You will see a field below the conditions section, which joins conditions 1 and 2 with AND or OR operators.

    What is AND operator?

    AND operator is an operator that performs a logical union on two conditions. It only yields a value of "true" when both conditions are true. If one of the two conditions is false, then the logical AND operator yields a "false" value and the platform will not perform any action.

    What is OR operator?

    This operator returns True if one or the other or both conditions are True. If either condition evaluates to True, platform performs an action accordingly. If neither condition evaluates to True, platform will not perform any action .

    • When you add more than one condition, The conditions are joined by an operator.
    • By default, And operator applies to the conditions.

    • Erase the AND operator between the conditions and replace it with the OR operator.

    • Once you erase the AND operator, you can choose the OR operator option from the drop-down, as shown below.

    • Click on the operator textbox, type OR in the textbox, and select OR operator from the drop-down.

    • Click on the condition textbox, type condition, and select condition-2 from the drop-down.

    The condition will be display, as shown below.

    Add Actions to the workflow step

    Action section is to tell the platform that it should perform the defined action when the above defined condition becomes true or satisfies.

    Go to the Actions section. There are three drop-down fields available.

    a) Action Levels drop-down contains the below options.

    • Section Level: This is to apply the action to the selected section, based on the condition.
    • Element Level: This is to apply the action to the selected Element, based on the condition.
    • Grid Level: This is to apply the action to the selected Grid, based on the condition.
    • SubForm Level: This is to apply the action to the selected SubForm, based on the condition.
    b) Actions drop-down Contains the below options based on the selection in the Action Levels.
    • If you select Section Level option in Action Levels drop-down, then the Actions drop-down will display two options.
      • Show Section: This is to Show the selected section based on the condition.
      • Hide Section: This is to Hide the selected section based on the condition.
    • If you select Element Level in Action Levels, then the Actions drop-down shows the below options.
      • Show Element: This is to Show the selected Element based on the condition.
      • Hide Element: This is to Hide the selected Element based on the condition.
      • Enable Element: This is to Enable the selected Element based on the condition.
      • Disable Element: This is to Disable the selected Element based on the condition.
      • Set value: This is to Set the value to the selected Element based on the condition.
      • Set Field Value: This is to set the field value for the selected Element based on the condition.
      • Set Operational Value: This is to set value based on the condition.
    • If you select Grid Level in Action Levels, then the Actions drop-down shows the below options.
      • Show Grid Element: This is to Show the selected Grid Element based on the condition.
      • Hide Grid Element: This is to Hide the selected Grid Element based on the condition.
      • Enable Grid Element: This is to Enable the selected Grid Element based on the condition.
      • Disable Grid Element: This is to Disable the selected Grid Element based on the condition.
      • Set value: This is to set the value to the selected Grid Element based on the condition.
      • Set Field Value: This is to set the field value for selected Grid Element based on the condition.
      • Set Operational Value: This is to set value based on the condition.
    • If you select SubForm Level option in Action Levels drop-down, then the Actions drop-down shows the below options.
      • Show SubForm Element: This is to Show the selected Grid Element based on the condition.
      • Hide SubForm Element: This is to Hide the selected Grid Element based on the condition.
      • Enable SubForm Element: This is to Enable the selected Grid Element based on the condition.
      • Disable SubForm Element: This is to Disable the selected Grid Element based on the condition.

    c) The Elements drop-down shows all the element fields present according to the selection in the Action Levels.

    • Click on Action Levels
    • Select Section Level if you want to show/ hide any section based on your condition.

    • Select Show Section/Hide Section.

    • Select the section that you want to show/hide from the Section Actions drop-down.

    • Select Element Level if you want to show/hide /enable/disable any element based on your condition.
    • Select an Action that you want for the element.

    • Select the element name from the Element Actions
    • Select Grid Level if you want to show/hide/enable/disable your Grid based on your condition.
    • Select SubForm Level if you want to show/hide/enable/disable your subform based on your condition.

    Note: If you want to add one more action for the application, click on the + in the Actions section, and add another Action.

    Add Validations

    Validation: A validation limits what a user can enter in an form element field by setting its defined boundaries.

    • To add validations, click on the Add Validation.

    • The Validations column opens on the Business Rules page.

    • Click on the Name text box and provide a valid name to the validation.

    • Click on the Rule on drop-down and select in which workflow step this validation should apply.

    • Click on the Conditions drop-down and select the element for which you want to add validation.

    • Click on Compare Type drop-down and select the comparison type.

    • Select the comparison operator from the Comparison drop-down field.

    • Click on the Fields drop-down in the Validations section and select the element name.

    • Click on the Validation Type drop-down and select the validation type.

    • Click on the Validation Message text box and enter the message that you want to display when the validation fails.

    • If you want to add more validations, click on the + symbol.

    • Click on the Save button to save the validations.

          Validations in Business Rules

          Important Note! : Since, you know how to add a Validation in Business Rules. The process flow to see the list of validations created, Check the validation status, Edit a validation, Delete a validation, Copy a validation is same as the Business Rules as explained above in this document.

           

          If you do not know how to add a validation, refer to Add Validation section under Business Rules Step.

          Best Practices 

          Learn about the best practices that you can keep in mind while creating business rules to get the better outcome.

          Videos

          To get full visual understanding of how to define business rules and validations, refer to the videos below.

          Part - 1 (Watch Time: 6 mins)

          Business rules 1

          Part - 2 (Watch Time: 6 mins)

          Business Rules 2

           

          Part - 3 (Watch Time: 5 mins)

          Business Rules 3