Text Function Rule Examples
The text functions that can be used in Intelligent Advisor are shown in example rules in the table below.
Function name | Example rule | Inputs | Outputs | Further information |
---|---|---|---|---|
Contains |
the account may be a benefit account if Contains(the account name, "benefit") |
the account name: Special Benefits | the account may be a benefit account = true | Check If a Text String Contains a Particular Substring |
Starts With |
the person should be represented if StartsWith(the person's name, "Sir") |
the person's name: Sir Lancelot | the person should be represented = true | Check If a Text String Contains a Particular Substring At the Start of the String |
Ends With |
the product uses the ascending sort code if EndsWith(the product code, "-ASC") |
the product code: B421-A3N-ASC | the product uses the ascending sort code = true | Check If a Text String Contains a Particular Substring At the End of the String |
Is Number |
the postcode is a valid Australian postcode if IsNumber(the postcode) and Length(the postcode) = 4 |
the postcode: 2612 | the postcode is a valid Australian postcode = true | Check If a Text String Is a Number |
Length |
the product code is valid if Length(the product code) > 8 |
the product code: 123456789 | the product code is valid = true | Find the Length of a Text String |
Concatenation |
the screen heading attribute for the person = the concatenation of the person's first name + ", " + the person's age + ", " + the person's occupation |
the person's first name: William the person's age: 20 the person's occupation: Student |
the screen heading attribute for the person = William, 20, Student | Combine Multiple Text Strings Into a Single Text Attribute |
Substring |
customer reference = Substring(customer name, 4, 4) |
customer name: maryjane |
customer reference = "jane" | Extract Part of a Text String |
Find |
the position number = Find(the person's username, "smith") |
the person's username: jeffsmith | the position number = 4 | Find the Position Number of a Text String Within Another Text String |
Text |
the customer's age text = Text(the customer's age) |
the customer's age: 25 | the customer's age text = "25" | Convert a Number Or Date Into a Text String |
Upper |
the person's surname in uppercase letters = Upper(the person's surname) |
the person's surname: Johnson | the person's surname in uppercase letters = JOHNSON | Change the case of a text string |
Lower |
the person's first name in lowercase letters = Lower(the person's first name) |
the person's first name: Rebecca | the person's first name in lowercase letters = rebecca | Change the case of a text string |
New Line |
the incident thread text = "Name: " + the person's name + NewLine() + "DOB: " + the person's date of birth |
the person's name: Reyansh the person's date of birth: 2000-07-12 |
Name: Reyansh DOB: 2000-07-12 |
Include a Newline Character In a Text String |
Quote |
the value contains a quote if Contains(the value, Quote()) |
the value = the answer is "London" | the value contains a quote = true |