Pass conditions define the specific criteria that must be met for the rule to be considered satisfied. These clearly outline the acceptable values using basic and logical operators for complex definitions. Pass conditions can be applied to the rules to evaluate the data based on the defined conditions.
- Basic conditions can be used for simple evaluation scenarios. You can configure a basic condition by selecting the value and the associated operator. The initial value field acts as an alias for all the target fields. Any condition configured in the Basic tab is converted into an expression in the advanced tab.
- Advanced conditions can be used for more complex evaluation scenarios.
Within the Advanced tab, you can configure an expression
using numerical, string and logical operators. Note: If the pass condition is being applied to a dataset, it is required to map all the fields first post which the rule can be created. A rule cannot be saved without all the fields being mapped.
Pass condition for fields
Pass conditions can be applied to the fields to evaluate the data based on the defined conditions.
Basic condition
- Select the combination of
<attribute><operator><enter value><value>and type a value that should match the condition. - Select the combination of
<attribute><operator><select field ><field>and select a field that should match the condition. In this case, you can compare the selected field with field of same data type. You can use this for all available data types.
The available operators depend on the data type of the selected field.
For example if a boolean datatype is selected, then the third field would provide an option to choose between true or false and if a string datatype is selected, the user would be prompted to enter a specific value.
Pass condition for datasets
- Select the combination of
<attribute><operator><enter value><value>and type a value that should match the condition. - Select the combination of
<attribute><operator><select field><field>and select a field that should match the condition. In this case, you can compare the selected field with field of same data type. You can use this for all available data types.
Supported operators
Numeric and temporal field operators
Use numeric operators to evaluate values in Integer, Long, Float, Date, DateTime, and Time fields.
| Operator | Binary/Unary | Expression true when |
|---|---|---|
| is | Binary | Field value is equal to a literal or field value. |
| is not | Binary | Field value is not equal to a literal or field value. |
| is null | Unary | Field value is null. |
| is not null | Unary | Field value is not null. |
| Greater than | Binary | Field value is greater than a literal or field value. |
| Greater than or equal | Binary | Field value is greater than or equal to a literal or field value. |
| Less than | Binary | Field value is less than a literal or field value. |
| Less than or equal | Binary | Field value is less than or equal to a literal or field value. |
String field operators
Use string operators to evaluate values in textual fields.
| Operator | Binary/Unary | Expression true when |
|---|---|---|
| Equal | Binary | Field string value matches a literal or field value. |
| Not equal | Binary | Field string value does not match a literal or field value. |
| In | Binary | Field string value matches any one of two or more literal values. (Type and press Enter to add each literal value to the box.) |
Logical field operators
Use logical operators to check values in fields that represent either true or false conditions.
| Operator | Binary/Unary | Expression true when |
|---|---|---|
| Equal | Binary | Field value is equal either to a literal True or False value or to the value in another Boolean field. |
| Null | Unary | Field value is null. |
| Not null | Unary | Field value is not null. |
Advanced condition for fields and datasets
Advanced condition is used for complex evaluation operations. You can type the expression using the available operators and functions. The advanced condition is also called as "Expression Builder" since you can build your own complex expressions. The syntax is color coded for better understanding while typing expression. An error is flagged when you mistype or misuse an operator or a function.
- When using advanced conditions, it is mandatory to use left and right operands along with the operator.
- Field names are case sensitive while using advanced conditions.
Incorrect field name casing does not flag an error in the expression and
will not apply the set
condition.
For example, in
ucase(FirstName)=true, the condition is applied when you haveFirstNamefield in your dataset. Inucase(FIRSTNAME)=true, the condition is not applied if your dataset does not haveFIRSTNAMEfield and no error is flagged in the expression.
Operators and their description
| Operator | Description |
|---|---|
| = (equals) |
Selects records where a field's value is equal to a specified
value. For example, |
| != (not equal to) |
Selects records where a field's value is not equal to a specified value. |
| > (greater than) |
Selects records where a field's value is greater than a specified
value. For example, |
| < (less than) |
Selects records where a field's value is less than a specified value. |
| >= (greater than or equal to) |
Selects records where a field's value is greater than or equal to a specified value. |
| <= (less than or equal to) |
Selects records where a field's value is less than or equal to a specified value. |
| IN |
Selects records where a field's value matches any value in a
specified list. For example, |
| IS NULL | Selects records where the specified field has a null or undefined
value. For example, Phone Number IS NULL, if you
have a database of customer information and you want to find all
records where the "Phone Number" field is not filled in, you would
use the "IS NULL" condition on the "Phone Number" field.
Phone Number IS NULL |
| IS NOT NULL | Selects records where the specified field has a defined
(non-null) value. For example, Email IS NOT NULL,
if you want to find all records in a dataset where the "Email" field
has been filled in (i.e., it is not null), you would use the "IS NOT
NULL" condition on the "Email" field. |
| AND |
Logical operator that combines multiple conditions and returns
results that satisfy all of them. For example, you may select
data where |
| OR |
Logical operator that combines conditions and returns results
that satisfy at least one of them. For example, you may select
data where |
| ! |
Logical operator that negates a condition, returning results that
do not meet the specified criteria. For example, |
Functions and their description
| Function | Description | Usage | Example |
|---|---|---|---|
| ucase |
Selects a string with uppercase (capital) letters. |
Standardize the case of characters in a text field. |
FIRSTNAME=ucase('AMY')
|
| lcase | Selects a string with lowercase (small) letters. |
Standardize the case of characters in a text field. |
LASTNAME=lcase('stamp')
|
| tcase | Selects a string with title case or with uppercase of the first letter of each word. |
Update the text in a string to title case. |
tcase('Mrs Mary Smith')=Name
|
| trim | Removes leading and trailing spaces from a string. | Clean up data, especially when dealing with user-inputted text that may have unnecessary spaces. |
trim('routley')=LastName
|
| ltrim | Removes leading (left-side) spaces from a string. | Clean data, ensuring consistent formatting by eliminating leading spaces. |
ltrim('AMY')=FirstName
|
| rtrim | Removes trailing (right-side) spaces from a string. | Standardize data by eliminating trailing spaces that might affect comparisons or visual representation. |
rtrim('stamp')=LastName
|
| lpack | Left-packs a string, removing leading spaces and adjusting remaining characters to the left. | Align text to the left while eliminating unnecessary leading spaces, aiding in data formatting. |
lpack('AMY')=FirstName
|
| rpack | Right-packs a string, removing trailing spaces and adjusting remaining characters to the right. | Align text to the right, removing trailing spaces for consistent formatting. |
rpack('stamp')=LastName
|
| mask | Generates a pattern to an actual input value, replacing certain characters with specified placeholders. | Helps verify the datatypes present in the generated pattern. For example, if the pattern generated for the input is AAANN, this indicates that A in the pattern contains alphabets and N represents numeric values. |
mask(Country)='AAANN'
|
| substr |
Extracts a substring from a given string based on specified starting position and length. |
Extract specific portions of text from a longer string. Two ways
of building expression: |
FIRSTNAME=substr('TAmy',2)
|
| concat | Joins two or more strings without space. | Combine information from multiple fields or sources into a single, cohesive string. |
concat('AMY',' ')=FirstName
|
| regexp | Applies a regular expression pattern to a string for pattern matching. | Complex pattern recognition and extraction in textual data. |
regexp(Email,'@.')='@g'
|
| replace | Replaces occurrences of a specified substring or pattern in a string with another substring. | Clean and update data, replacing specific elements with desired values. |
replace('Mircosoft','rco','cro')=Company
|
| split | Splits a string into an array of substrings based on a specified separator character. | Separate of text data into individual components for analysis or processing. |
split('Sweden:BasicCountry',':',0)=Country
|
| dt_now | Returns current date-time in given format. | Ensures that the date-time is displayed in the specified format. |
dt_now('MM/dd/yyyy hh:mm:ss')
|
| dt_add | Increments or decrements the given part of date or time. | Modifies the selected date or time associated with the database. |
dt_add('03/12/2013', 'dd/MM/yyyy', 'Month', 3)
|
| length |
Selects a string having the specified length (number of characters). |
Know the size of a string, often used for validation. |
length(CollectionNumber) > 1
|
| to_number | Selects a numeric string having a specified numerical value. | Transform string representations of numbers into numeric formats for mathematical operations. |
to_number('100')=CustomerId
|
| to_int | Selects double value as per specified integer value. | Maintain data consistency and facilitate numerical calculations. |
to_int(22.53)=Currency
|
| occstr | Returns the position of the first occurrence of a specified substring in a string. | Locate specific substrings within text data. |
occstr(Email,'.','L')=3
|
| now | Selects the current date and time. | Provide a dynamic timestamp for real-time data capture or time-sensitive operations. |
now()=Totaltime
|
| date_to_seconds | Converts iso format string to UTC seconds. | Standardizes the date in UTC format. |
date_to_seconds('2023-08-20T12:10:20')
|
| dt_diff | Calculate difference b/w two different or same format types of date-time values. | Provides an option to calculate the difference between two date formats and returns the value. |
dt_diff('03/12/2013', 'dd/MM/yyyy', '2014-11-23',
'yyyy-MM-dd')
|
| dt_part | Extracts the specified part of date-time and return the value as an integer. | Returns the specified parameter in the date time format as specified in the expression. |
dt_part('2014-02-08', 'yyyy-MM-dd', 'month')
|
| isalpha | Selects a string containing only alphabetic characters. | Verify if a text field consists solely of letters. |
isalpha('test')
|
| isnumeric | Selects a string containing only numeric characters. | Facilitate validation of numeric data integrity in text fields. |
isnumeric('100')!=CustomerId
|
| isnull | Selects fields with the absence of any value. | Check fields for missing or unknown data. |
isnull(NAME)
|
| isempty | Selects an empty string. | Check that text fields are not null or empty. |
isempty('')!=PostalCode
|
| contains |
Selects a string containing a specific substring. |
Search for a particular set of characters within a larger string. |
contains('@', Email) != 0
|
| dt_is_date | Checks whether given input is of date or not. | Ensures that the data is in the specified date format. |
dt_is_date('03/12/2013','dd/MM/yyyy')
|
| begins_with |
Checks whether a string starts with the value given or not. |
Used to determine if a given string starts with a specified substring. It typically returns a boolean value (true or false) indicating whether the condition is met. |
begins_with(String data, String
value)
|
| ends_with | Checks whether a string ends with the value given or not. | Used to determine whether a given string concludes with a specified suffix or substring. It typically returns a Boolean value (true or false) indicating the result of this check. |
|
|
not_in |
It excludes the values present in data. | It is used in programming and database queries to exclude values from a specified list. It checks whether a value does not exist in a given set. |
|
| to_date | Selects the specified ISO format date (YYYY-MM-DD). | Transform date representations in string format for date-related operations. |
to_date('1973-06-05') = Date
|
| to_time | Selects the specified ISO format time (HH:MM:SS). | Transform time representations in string format for time-related calculations. |
to_time('09:04:43')=Time
|
| to_datetime | Selects the specified ISO format datetime (YYYY-MM-DDTHH:MM:SS). | Integrate date and time information from string formats into datetime values for comprehensive temporal analysis. |
to_datetime('1973-06-05T09:04:43')=DateTime
|
Dimensions supported in Custom Rules:
| Dimension | Description |
|---|---|
| Completeness | Checks for completeness in the configured custom rule |
| Validity | Checks if the entered values are valid thereby eliminating any void or null values. |
| Consistency | Checks for uniformity of information across systems |
| Accuracy | Reflects the degree to which information reflects correctly |
| Timeliness | Ensures the information is available when required |
| Uniqueness | Ensures each data element appears only once in the database. |