If in
Conditionally merges different content depending on whether a value appears in a list you give. Use it to treat a handful of codes, tiers, or regions the same way without writing a separate test for each.
Syntax
{{#ifIn data value}}true content{{else}}false content{{/ifIn}}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| Data | Text or Number | Required | The value to look for. |
| Value | Text | Required | The list to look in, as values separated by commas. |
Note: The list is a single argument."4,5,6,334"and4,5,6,334both work, but quote it if any value contains a space.
Note: Spaces after the commas are ignored, so"gold, silver"works the same as"gold,silver".
Note: The match is exact and case sensitive, so a field holdingGolddoes not match a list of"gold, silver". Pass the field through Lowercase first if your data varies. This is the opposite of If equal, which ignores capitalization.
Note: Each value must match in full. A list of"4,5,6"does not match a field holding14. For a partial match, use If contains.
Examples
The examples below are based on the following sample content:
{{#ifIn Contact.programCode "4,5,6,334"}}You qualify for a discount on your next order!{{/ifIn}}
A. The contact's programCode field has a value of 5
You qualify for a discount on your next order!
B. The contact's programCode field has a value of 14
Nothing is merged.