Rule Verbs
  • 19 Jan 2024
  • 11 Minutes to read
  • Dark
    Light

Rule Verbs

  • Dark
    Light

Article Summary

Feature Modifications

Modified in Version

8.17

Modification Details

The IsNan Rule verb has been updated to function exclusively with the double data type, and it no longer accommodates Int32 and decimal types.

Rule verbs act as the building blocks of Rule engine, enabling the formulation of logical statements that determine how data is processed and actions are taken in accordance with predefined rules and conditions.

The following article describes all the Rule Verbs present in the Rule Engine for different data types.


Common

These are the common Rule verbs across all the data types.

Verb Name

Description

Exists

This verb checks whether an entity exists or is present.

Is

This verb verifies whether a value meets a specific condition.
Note: This verb also takes into account whether the condition is met in a case-sensitive manner.

Is Not

This verb confirms that a value does not meet a certain condition.
Note: This verb also takes into account whether the condition is met in a case-sensitive manner.

Evaluate Dynamic Expression as Rule

Allows the use of a dynamic expression, which is typically a formula, condition, or custom logic, as a criterion for evaluating a Rule.

E.g., 10*2=20 will be evaluated to True within a specified string input.


String

Verb Name

Description

Character Is Letter

Determines if a character is a letter at a specific position in the String.

E.g., The string "A123" includes a character at position 1 but not at positions 2, 3, and 4.

Character Is Numeric

Determines if a character is numeric at a specific position in the String.

E.g., The string "ABC3" includes a numeric at position 4 but not at positions 1, 2, and 3.

Character Is Symbol

Determines if a character is a symbol at a specific position in the String.

E.g., The string "ABC&" includes a character at position 4 but not at positions 1, 2, and 3.

Characters Are Letters

Identifies if characters in a string are letters at specific positions in the String.

E.g., The string "ABC12" includes letters at positions 1, 2, and 3 but not at positions 4 and 5.

Characters Are Numeric

Identifies if characters in a string are numeric at specific positions in the String.

E.g., The string "ABC12" includes numeric at positions 4 and 5 but not at positions 1, 2, and 3.

Characters Are Symbol

Identifies if characters in a string are symbols at specific positions in the String.

E.g., The string "AB@12%" includes symbols at positions 3 and 6 but not at positions 1, 2, 4, and 5.

Is Character Equal

Confirms whether the specified character exists at the given position within the string.

E.g., Character B specified at position 2 in string ABC will return true.

Text Contained At Position

Verifies if a string contains a specified substring at a specific position.

E.g., The string "ABCD" contains "CD" as a substring at position 3.

Text Equals at Position

Verifies if a string contains a specified substring at a specific position.

E.g., The string "ABCD" contains "CD" as a substring at position 3.

Length Equals

Verifies the length of the String with the given input count.

E.g., The length of the String "ABC" matches with the given input value 3.

Length Greater Than

Verifies if the length of the String is greater than the given input count.

E.g., The length of the String "ABC" is greater than the given input value 2.

Length Less Than

Verifies if the length of the String is less than the given input count.

E.g., The length of the String "ABC" is less than the given input value 4.

Longer Than

Verifies if the length of the String is greater than the given input string.

E.g., The length of the String "ABC" is longer than the given input string "DE".

Ends With Any

Identifies if a string ends with any value from a provided list.

E.g., The string "ABCD" ends with "D" from the provided list C, D.

In List

Determines if a string exists within a given list.

E.g., The string "AB" is in the list of strings CD, AB, and AC.

Is Between

Identifies if a string falls between 2 strings.

Starts With Any

Determines if a string begins with any value from a provided list.

E.g., The string "ABCD" starts with "ABC" from the provided options, "ABC", "BCD" or "CDE".

String Does Not End with Any in List

Determines if a string does not conclude with any values specified in a given list.

E.g., The string ABC does not end with any of the provided lists LMN, XYZ, or DEF.

String Does Not Start with Any in List

Determines if a string does not begin with any of the values specified in a given list.

E.g., The string ABC does not start with any of the provided lists LMN, XYZ, or DEF.

String Ends with Any in List

Determines if a string exists within a given list.

E.g., The string "AB" is in the list of strings CD, AB, AC.

String Starts with Any in List

Determines if a string starts with any value from a provided list.

E.g., The string "ABCD" starts with "ABC" from the provided options, "ABC, BCD, or CDE.

Regex Does Not Match

Confirms if a string does not adhere to a specified regular expression pattern.

E.g., String "ABC" does not match with the regex pattern [abc]

Regex Match

Checks if a string matches a provided regular expression pattern.

E.g., String "aabbcc" match with regex pattern [abc]

Contains

Verifies if a string contains a specified substring.

E.g., The string "ABCD" contains "CD" as a substring.

Ends With

Checks if a string ends with a specified substring.

E.g., The string "ABCD" ends with "D".

Equals

Verifies if two strings are identical.

E.g., The string "ABC" is precisely the same as the string "ABC".

Is Empty

Checks if a string is Empty.

Is Not Empty

Checks if a string list is not Empty

Starts With

Determines if a string begins with any of the provided substrings.

E.g., The string "ABCD" starts with "AB".

List Contains Five Of

Confirms if a list contains at least five of the specified strings.

E.g., The list "AB, BC, DE, FG, HK, LM, XY" contains only Five of "AB, DE, FG, HK, and LM", not less nor more than 5.

List Contains Four Of

Verifies if a list contains at least four of the specified strings.

E.g., The list "AB, BC, DE, FG, HK, LM, XY" contains only Five of "AB, DE, FG, and LM", not less nor more than 4.

List Contains More Than One

Validates if a list contains more than one instance of a specific string.

E.g., The list "AB, BC, DE, FG, HK, LM, XY" contains more than one line item from the specified list "BC, HK".

List Contains Number Of Other List

Validates if a list contains a particular number of elements from another list.

E.g., The list AB, BC contains only 2 lists from the list AB, BC, AB, DE, FG, HK, LM, XY.

List Contains Three Of

Validates if a list contains at least three of the specified strings.

E.g., The list "AB, BC, DE, FG, HK, LM, XY" contains only Five of "AB, DE, and LM", not less nor more than 3.

List Contains Two Of

Confirms if a list contains at least two of the specified strings.

E.g., The list "AB, BC, DE, FG, HK, LM, XY" contains only Five of "AB, and LM", not less nor more than 2.

List Contains

Confirms if a list contains a specific string.

E.g., The string "AB, BC, DE, FG" contains "BC" as a substring.

List Contains All

Verifies if a list contains all specified strings.

E.g., The string "AB, BC, DE, FG" contains all of the strings from "AB, BC, DE, FG".

List Contains Any

Determines if a list contains any of the specified strings.

E.g., The string "AB, BC, DE, FG" contains "BC, FG, AB" as a string.

List Contains At Position

Verifies if a string list contains a specified string at a specific position.

E.g., The list "AB, BC, DE, FG, HK, LM, XY" contains "DE" as a string at position 2 as it is a 0-based position.

List Contains Count

Verifies if a string list contains a specific count of a similar string list.

E.g., The list "AB, BC, DE, FG" contains only 2 strings from the list "AB, BC, KL".


DateTime

Verb Name

Description

After Days

This Rule evaluates whether a given date falls after a specified number of days. The number of days can be configured as past or future relative to the current date.

E.g., Suppose today is August 1, and you want to check if a given date, August 10, falls after 7 days. The Rule evaluates whether August 10 is greater than August 1 + 7 days (which is August 8). Since August 10 is indeed after August 8, the Rule evaluates to true.

Before Days

This Rule evaluates whether a given date falls before a specified number of days. The number of days can be configured as past or future relative to the current date.

E.g., Consider today is August 10, and you want to check if a given date, August 4, falls before 5 days. The Rule evaluates whether August 4 is less than August 10 - 5 days (which is August 5). Since August 4 is before August 5, the Rule evaluates to True.

Greater Than

Compares if a specific date and time is later than another given date and time.

E.g., August 5 is greater than August 1.

Greater Than Or Equal To

Compares if a given date and time is later than or equal to another specified date and time.

E.g., August 5 is not greater than but equal to August 5.

In Timespan

Checks if the given date falls within a defined duration from a specific date time.

E.g., August 5 falls within a time span of 2 days starting from August 4.

Is Between

Checks if a specific date and time falls within a specified range, inclusively.

E.g., August 5 falls within a time span of August 5 and August 10.

Is Date and Time Between

Verifies if a given date and time falls within a defined range, inclusively.

E.g., August 5 falls within a time span of August 5 and August 10.

Is Now Between

Determines if the current date and time fall before a specified date.

E.g., August 5 lies before the specified date of August 10.

Is Same Day

Determines if the date and time value lie on the same calendar day.

E.g., August 5, 23:59:00, lies on the same day as August 5.

Is Specified

Checks if a DateTime value has been provided or specified.

Less Than

Compares if a certain date and time is earlier than another specified date and time.

E.g., August 1 is less than August 5.

Less Than Or Equal To

Compares if a specific date and time is earlier than or equal to another specified date and time.

E.g., August 5 is not less than but equal to August 5.


Decimal/Int32/Double

Following Rule Verbs are common between Decimal, Int32, and Double data types.

Verb Name

Description

Between

Determines if a specific decimal value falls within a specified range. It also allows configuring the minimum and the maximum values.

E.g., Value 7 is between 5 and 10.

Equals

It compares if two decimal values are equal.

E.g., Value 7 equals value 7.

Equals Without Decimal

Compares if two decimal values are equal, excluding any decimal fractions.

E.g., Value 7.28 is equal to the value 7.15.

Greater Than

Checks if a decimal value is greater than another specified decimal value. E.g., Value -5.5 is greater than -7.5.

Greater Than In Percents

Determines if a decimal value exceeds a certain percentage of another specified decimal value.

E.g., Value 6 is greater than 10 percent of value 50 (5).

Greater Than Or Equal To

Compares if a decimal value is greater than or equal to another specified decimal value.

E.g., Value -5.5 is not equal to but is greater than value -5.6.

Is Even

Determines if a given number is an even integer (divisible by 2). E.g., Value 10 is an even number as it is divisible by 2 without any remainder.

Less Than

Checks if a decimal value is less than another specified decimal value.

E.g., Value -7.5 is less than -5.5.

Less Than In Percents

Determines if a decimal value is less than a certain percentage of another specified decimal value.

E.g., Value 4 is less than 10 percent of value 50 (5).

Less Than Or Equal To

Checks if a decimal value is less than or equal to another specified decimal value.

E.g., Value -5.7 is not equal to but is less than value -5.6.

Numbers Equal

It compares if two decimal values are the same.

E.g., Value 7 equals value 7.


Boolean

Verb Name

Description

Is True

Checks if a boolean is true, representing the logical truth.

Is False

Checks if a boolean value is false, representing the logical falsehood.


Double

Following Rule Verbs are only specific to Double Data Types.

Verb Name

Description

Is Negative Infinity

Checks whether the input value is equal to Negative Infinity. Negative Infinity is a mathematical concept representing a value that is infinitely small and negative. In the context of Double data type, this verb evaluates to true if the input is Negative Infinity.
A Rule created using this Verb can be used with the "Create Infinity (Double)" Flow Step found in Toolbox > Data > Numbers > Double in Flow Designer.

Is Positive Infinity

Checks whether the input value is equal to Positive Infinity. Positive Infinity is a mathematical concept representing a value that is infinitely large and positive. In the context of Double data type, this verb evaluates to true if the input is Positive Infinity.
A Rule created using this Verb can be used with the "Create Infinity (Double)" Flow Step found in Toolbox > Data > Numbers > Double in Flow Designer.

IsNan

This Rule determines if a given value is a special floating-point value known as "Not-a-Number" (NaN), often used to represent undefined or unrepresentable results of mathematical operations.
A Rule created using this Verb can be used with the "CreateNan (Double)" Flow Step found in Toolbox > Data > Numbers > Double in Flow Designer.


File Data

Using File Data directly in a Rule will not result in Rule evaluation. Users must use the attributes of File Data within a Rule to evaluate the Rule.

These attributes include Contents (Byte array), FileName (String), FileType (String), File ID (String), etc.


Feature Changes

Description

Version

Developer Task

The IsNan Rule verb has been updated to exclusively function with the Double data type, and it no longer accommodates Int32 and Decimal types.

8.17

[DT-039330]


Was this article helpful?