Ends with

See also: Starts with, Contains

images/download/attachments/201666767/image-2025-4-1_15-32-19-version-1-modificationdate-1743514339376-api-v2.png

The Ends with compare type checks if the text (String) given as the Check value (value configuration on the left) ends exactly with the string (String) defined as the Compare value (value configuration on the right).

  • The screenshot above uses static text value resolvers (see Static values) with the texts 'Check value' and 'Compare value' to illustrate the interaction of the components.

NOTE

  • The text comparison is case sensitive.

  • There is no automatic conversion of unsuitable values to text (String). When required, the Input object (type safe) value resolver or a suitable value resolver from the String processing category can be used to convert another data type into a string.

Special cases:

  • The check is considered failed if at least one of the value configurations (Check value, Compare value) does not return a String.

  • Since 'No value' ($null) is also not a string, a check like ($null) Ends with ($null) is considered failed.

  • If the Check value and the Compare value match completely, an Ends with comparison is considered passed.

  • An empty string ("") can be used as a Check value and as a Compare value. A check with "" as a Compare value will always pass if the Check value is a String.

Specific examples:

Check value
(JSON notation)

Compare value
(JSON notation)

Check result

Comments

"321.99"

"321.99"

images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg
 true

Check value Ends with the Compare value

"321.99"
"99"
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg
 true

Check value Ends with the Compare value

"321.99"
"98"
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Check value does not end with the Compare value

""
"99"
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Check value does not end with the Compare value

321.99
"99"
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Check value is not a String

$null
"99"
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Check value is not a String

"321.99"
99
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Compare value is not a String

"321.99"
$null
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Compare value is not a String

"321.99"
""
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg
 true

Check value Ends with the Compare value

$null
$null
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg
 false

Check value is not a StringCompare value is not a String

""
""
images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg
 true

Check value Ends with the Compare value

Configuration

The value configurations for Check value (left) and Compare value (right) are not optional for the Ends with compare type.

Both value configurations must return strings (String) at runtime, otherwise the Entity property rule is considered failed.

Examples

Check TLD of an e-mail address

An association criterion (see Association criteria) should be considered to have been passed precisely when the e-mail address stored for a guest user refers to the top-level domain cn for China.

Configuration:

  • Within an AND conjunction, a Check type first ensures that a guest user account (see Guest users) is present as the reference object.

  • The Entity property rule with the Ends with compare type is evaluated only in the context of a guest user account:

    • As a Check value (left), an Object property value resolver accesses the 'E-mail address' (emailAddress) text field in the guest user account, which returns a String as a required field. The concatenated Lower case value resolver converts any uppercase letters that may be contained in the e-mail address to the corresponding lowercase letters for comparison purposes. This makes the Ends with comparison here 'case insensitive'.

    • The string for the Compare value (right) is stored as static text (see Static values) directly in the configuration.

images/download/attachments/201666767/image-2025-4-1_15-43-9-version-1-modificationdate-1743514989042-api-v2.png

Check whether each line of text was terminated with a semicolon

The Validating rule of an event handling (see Event handling) is intended to ensure that event actions are executed only if a list of strings, each of which ends with a semicolon (;), is passed as input value.

Configuration:

The AND conjunction shown on the right is configured as the Validating rule:

  • The Check type here declares that the input value should be a list of text values (String[]). At runtime, the lines of the text being checked are provided in this form.

  • The Entity property rule below should be considered passed if there is no row that does not satisfy the 'Ends with ;' format rule:

    • The actual checking of the rows is done by another Entity property rule that uses a Rule list resolver as a criteria. This uses the text of the line as a Check value via a Right trim value resolver in such a way that it removes any whitespace characters that are at the end of the row.

    • The semicolon (;), which is defined as static text (see Static values), serves as a Compare value for the Ends with comparison negated by not (Matcher).

    • Since the Resolve all as list option is not checked, the Rule list resolver terminates the evaluation when it first finds a row that is not 'terminated' with a semicolon and returns its text. If no such row exists, the return value is 'No value' ($null).

    • The return value from the Rule list resolver is evaluated by the outer Entity property rule per the Is empty compare type, so the Validating rule returns true overall if no row is disputed.

images/download/attachments/201666767/image-2025-4-1_15-41-31-version-1-modificationdate-1743514891746-api-v2.png

NOTE◄ It may be necessary to exclude the special case that the list in the input value is completely empty ([]) by an additional rule in the AND conjunction. Because then the Rule list resolver also returns 'No value' ($null) and the Validating rule is considered to be fulfilled because no row is disputed.