The function fn:containsIgnoreCase determines whether a target string contains a specified substring. It ignores whether the target string text is written in upper or lowercase. The value returned is a Boolean data type.
Example
The job title Manager is stored in the attribute user.CustomAttribute['job title']. The attribute may contain "Manager", "manager" or "MANAGER", etc. All recipients with 'manager' (any case) receive a special line of text in their message. The line of text is inserted into the message using an InsertIf statement, which is constructed as follows:
<%InsertIf expression="${fn:containsIgnoreCase(user.CustomAttribute['job title'], 'manager')}"%>Text<%/InsertIf%>
CODE
Structure
fn:containsIgnoreCase(string, string)
Parameters
Parameter | Description |
---|
string | Specifies the target string. |
string | The value (substring) used to query the target. |