- 22 May 2024
- 5 Minutes to read
- Print
- PDF
Condition
- Updated on 22 May 2024
- 5 Minutes to read
- Print
- PDF
Condition
A condition consists of a field, an operator, and a value. Conditions determine which transactional records are selected for processing by a Business Rule. Complex conditions can be crafted for rules that incorporate multiple conditions, using AND or OR operators to connect them.
You can use the condition builder to determine when the Business Rule actions should be executed. When a request arrives, there are two options the user can select:
• Based on Condition: Select this button to specify the conditions based on which the action would be executed. When you select this option, the Business Rule will be executed only if the below conditions are met.
Figure: Based on Condition
• Always (no condition): Select this button if there are no conditions. On selecting this option, the Business Rule will be executed for all the records.
Figure: Always
To add a Condition, perform the following steps:
1. Under Run, select whether you want to run Based on Condition or Always.
2. Click +Add Filter Set and add the condition using the Field, Operator and Value section.
3. To add multiple conditions, click the Icon and to delete a condition click the icon.
4. To Group two or more conditions, click the Group icon. For more information on Grouping Conditions, refer Grouping of Conditions.
4. Click Next.
Figure: Condition Configuration
The following table contains a brief description of Conditions section fields.
Field | Description |
---|---|
Field | Select the field from the drop-down menu based on the table selected in the General Details tab. |
Operator | Choose the operator to meet the stipulated condition in value. The operator would vary depending on the type of values selected in the Field. For example, Text, Numeric etc. |
Value | Specify the value to be attained. |
Field
Field values will populate according to the transaction table chosen from the drop-down list in the General Details tab, from where you can select the necessary option.
Operator
The operators will be displayed based on the selected field value. Select the required operator from the drop-down list. The Possible values for Operator are as shown below.
When the Data Type is String
Consider the example where the user has selected the Description field under the Conditions, then the Operators loaded will be related to the Textbox values.
Field | Operator | Value |
---|---|---|
Description | Starts with | Outlook |
Description | Ends with | Outlook |
Description | Contains | Outlook |
Description | Does not contain | Outlook |
Description | Is | Outlook |
Description | Is Not | Outlook |
Description | Is Empty | NA |
Description | Is Not Empty | NA |
When Data Type is Date
Consider the example where the user has selected the Date field, then under the Conditions, the Operators loaded will be related to the Date values.
Field | Operator | Value |
---|---|---|
Date Type | On | 16-May-2023 |
Not on | 16-May-2023 | |
Before | 16-May-2023 | |
On or Before | 16-May-2023 | |
After | 16-May-2023 | |
On or After | 16-May-2023 | |
Between | 1-1-2022 - 31-12-2022 | |
Closed Date | Is Empty | NA |
Is Not Empty | NA | |
Is Anything | NA | |
Is Same | Logged Date | |
Is Different | NA | |
Is More Than | one day after current date | |
Is Less Than | two days before current date | |
Last Updated | Changes | NA |
Doesn't Change | NA | |
Changes From | NA | |
= | Today, Yesterday, Tomorrow, This week, Last Week, Next Week, This Month, Last Month, Next Month, Last 3 Months, Last 6 Months, Last 9 Months, Last 12 Months, Last Quarter, Last 2 Quarters, This Quarter, Next Quarter, Last Year, Last 2 Years, Last 7 Days, Last 30 Days, Last 60 Days, Last 90 Days, Last 120 Days, Current Hour, Last Hour, Last 2 Hours, Current Minute, Last 15 Minutes, Last 30 Minutes, Last 45 Minutes |
When Data Type is Numeric
Consider the example where the user has selected the Numeric field, then under the Conditions, the Operators loaded will be related to the Numeric values.
Field | Operator | Value |
---|---|---|
Cost | = | 15 |
Cost | != | 15 |
Cost | > | 15 |
Cost | < | 15 |
Cost | Is Empty | 15 |
Cost | >= | 15 |
Cost | <= | 15 |
Cost | Between | 15 to 50 |
Cost | Changes | 15 |
Cost | Doesn't Change | 15 |
Cost | Changes from | 15 to 50 |
Cost | Is one of | 15 |
Cost | Is not one of | 15 |
When Data Type is Boolean
Consider the example where the user has selected the Field as Is Active under Conditions, then the Operator displayed is Is and Value will be displayed as shown below.
Figure: When Data Type is Boolean
Value | Implication |
---|---|
Yes | |
No |
Value
Based on the selected Field type and Operator, the options in the Value field will be populated. The Value field can be one of the following four types:
- Date: Represents a calendar date. This can be used for inputting or displaying dates in various formats (e.g., MM/DD/YYYY or YYYY-MM-DD). In programming, date-related operations and formatting are commonly used for managing time-sensitive data.
- Dropdown: A dropdown, also known as a drop-down menu or list, is a user interface element that allows users to select one option from a list of available options. This is often used when you have a predefined set of choices, and the user can choose one from the list.
- Numeric: Refers to numerical data, including integers and floating-point numbers. Numeric input is used when you need users to enter numerical values, such as quantities, amounts, or any other numeric data. Validation is typically applied to ensure that only valid numeric input is accepted.
- String: Represents a sequence of characters. String input is used for text-based data, such as names, addresses, or any other textual information. It's a versatile data type that can accommodate a wide range of alphanumeric characters.
Grouping of Conditions
When there are multiple conditions which need to be computed together, these conditions can be grouped together in a Business Rule. This can be achieved by using the AND/OR conditions and by using the grouping functionality provided in the tool.
Let's explore the following use case to understand how to use Grouped Conditions:
The condition provided and the sequence of execution will be performed as shown below:Use CaseUser Persona: Application DesignerSolutionThe analyst Rosy wants to auto close low priority Incidents which belong to the Network workgroup.Here, the application designer Sam can configure a Business Rule to trigger in the Incident Module in Async mode with the below condition.AND
{Status = Resolved AND Priority = P4}
Workgroup = Network
Figure: Grouped conditions example
Usage of Dynamic Tables
Dynamic tables refer to tables in a user interface or in the backend of an application that can change their structure, content, or appearance dynamically based on certain conditions, user interactions, or data changes. These tables are highly flexible and adaptable, allowing developers to create interfaces that can accommodate various data formats and user requirements.
Consider an example where we want to use Dynamic table to add a condition where the Workgroup should be selected dynamically through an admin Table.
The Dynamic operator function can be used to map the admin table as shown below. Upon selection, all the admin tables get populated.
Figure: Using Dynamic Operator to access admin Tables