- 1 Minute to read
- Print
- DarkLight
fn:toLowerCase
- 1 Minute to read
- Print
- DarkLight
The function fn:toLowerCase converts all of the characters in a string to lower case for the purpose of performing a query. The actual source string is not changed in any way. The value returned is a string data type.
Example
The custom attribute user.CustomAttribute['job title'] contains any number of possible job titles. When the list used to populate this data was created, the spelling of these values was not verified. The values stored in the attribute contain variations in capitalization, e.g., 'MANAGER", 'manager' and 'Manager'.
All recipients with 'manager' (any case) will receive a special text in their email.
The function fn:toLowerCase is used to convert all values in the target attribute to lower case. This result is then compared to specified value manager using the operator == to convert the resulting string into a Boolean value. The text is inserted into the message using an InsertIf statement, which is constructed as follows:
<%InsertIf expression="${((fn:toLowerCase(user.CustomAttribute['job title'])=='manager'))}"%>Text<%/InsertIf%>
Structure
fn:toLowerCase(string)
Parameters
Parameter | Description |
---|---|
string | Specifies the target string. |