Business Rules
  • 17 Oct 2022
  • 8 Minutes to read
  • Contributors

Business Rules


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

A Business Rule is a statement or condition that imposes limitations on specific aspects of 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 and Multiple Conditions

EXAMPLE
In a company, the Experience section field and the Previous Project Details section field can only be filled out on the joining application if the new employee has experience.
  • Click on the Add Rule button.


  • The Add rule section will display on 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 the opportunity 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, the 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's field value with another field value in the application.


Compare with value:

Select the Compare with Value optionA comparison drop-down will be displayed 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 check 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 requirements.

NOTE
Users can also add multiple conditions to a single business rule and combine them with an 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 the AND operator?

The "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 the 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

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

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


a) The 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 level based on the condition.

b) Actions drop-down, It contains the below options based on the selection in the Action Levels.

  • If you select the Section Level option in the Action Levels drop-down, then the Actions drop-down will display two options.
    1. Show Section: This is to show the selected section based on the condition.
    2. 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.
    1. Show Element: This is to show the selected element based on the condition.
    2. Hide Element: This is to hide the selected element based on the condition.
    3. Enable Element: This is to enable the selected element based on the condition.
    4. Disable Element: This is to disable the selected element based on the condition.
    5. Set value: This is to set the value to the selected element based on the condition.
    6. Set Field Value: This is to set the field value for the selected element based on the condition.
    7. Set Operational Value: This is to set a value based on the condition.
  • If you select Grid Level in Action Levels, then the Actions drop-downshows the below options.
    1. Show Grid Element: This is to Show the selected Grid Element based on the condition.
    2. Hide Grid Element: This is to Hide the selected Grid Element based on the condition.
    3. Enable Grid Element: This is to Enable the selected Grid Element based on the condition.
    4. Disable Grid Element: This is to Disable the selected Grid Element based on the condition.
    5. Set value: This is to set the value of the selected Grid Element based on the condition.
    6. Set Field Value: This is to set the field value for a selected Grid Element based on the condition.
    7. Set Operational Value: This is to set value based on the condition.
  • If you select the SubForm Level option in the Action Levels drop-down, then the Actions drop-down shows the below options.
    1. Show SubForm Element: This is to Show the selected Grid Element based on the condition.
    2. Hide SubForm Element: This is to Hide the selected Grid Element based on the condition.
    3. Enable SubForm Element: This is to Enable the selected Grid Element based on the condition.
    4. 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 or hide any section based on your condition.


  • Select Show Section or Hide Section.


  • Select the section that you want to show or 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 to the application, click on the + in the Actions section, and add another Action.

Validations

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.


  • When the validation fails, click on the Validation Message text box and enter the message that you want to display.


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


  • Click on the Save button to save the validation.

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 the same as the Business Rules as explained above in this document.

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

Best Practices 

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

Videos

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

Part-1 (Watch Time: 6 mins)

Part-2 (Watch Time: 6 mins)

Part-3 (Watch Time: 6 mins)



Was this article helpful?