If contains
Conditionally merges different content depending on whether a value contains the text you give, anywhere within it. Use it when a code or label carries meaning inside it, such as a region marker in a program code.
Syntax
{{#ifContains data value}}true content{{else}}false content{{/ifContains}}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Data | Text | Required | The value to search in. |
| Value | Text | Required | The text to look for. |
Note: Capitalization is ignored, soUSmatches a value holdingus. If you need an exact, case sensitive match on the whole value, use If equal instead.
Note: The text can appear anywhere in the value. To match only the beginning, use If starts with.
Examples
The examples below are based on the following sample content:
{{#ifContains Contact.programCode "US"}}United States{{else}}International{{/ifContains}}
A. The contact's programCode field has a value of 123EU
International
B. The contact's programCode field has a value of 487US
United States