fn:contains
    • 1 Minute to read
    • Dark
      Light

    fn:contains

    • Dark
      Light

    Article summary

    The function fn:contains determines whether a target string contains a specified substring. The value returned is a Boolean data type.

    Example

    The job title Manager is stored in the attribute ​user.CustomAttribute['job title']​ and is always entered as "Manager". All recipients with this job title 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:contains(user.CustomAttribute['job title'], 'Manager')}"%>Text<%/InsertIf%>

    Structure

    fn:contains(string, string)

    Parameters

    Parameter

    Description

    string

    Specifies the target string.

    string

    The value (substring) used to query the target.


    Was this article helpful?