Check If a Text String Contains a Particular Substring At the Start of the String
To determine if a particular string is contained at the start of a text attribute or text constant, you can use the following syntax with the StartsWith function. Either of these text strings can be text attributes or text constants. The text comparison is case-insensitive.
- StartsWith(<text value>, <text substring>)
Examples of the use of the StartsWith function in rules are given in the following table.
Example rule | Inputs | Outputs |
---|---|---|
the record was created before 2000 if StartsWith(the record identification code, "19") |
the record identification code: 19005 | the record was created before 2000 = true |
the record identification code: 20158 | the record was created before 2000 = false | |
the person should be represented if StartsWith(the person's name, "Sir") |
the person's name: Sir Lancelot | the person should be represented = true |
the person's name: Mr Bob Jones | the person should be represented = false |