I am trying to dynamically populate a banner in an email based on a subscriber's "emailListIds" field, which appears to be available as a field within the email, but I can't seem to get the logic to cooperate. Is this a possible field to use in this way? If not, is it being considered as an option? TIA!
Page 1 / 1
@Holly Taylor Yes, you can use the emailListIds data field from the users profile. One thing that could be tripping you up, is that this data field is an Array. Also, this data field wont work with Dynamic Lists.
When looking into more complex data fields, I like to use the _#ifContains_ handlebar method.
Example:
```
{{#ifContains emailListIds '12345'}}
Show content for users in list 12345
{{else}}
Show content for users who are not in that list
{{/ifContains}}
```
Handlebar doc link: https://support.iterable.com/hc/en-us/articles/205480365-Personalizing-Templates-with-Handlebars-#check-for-an-item-ifcontains
If this doesn't fully help, could you create a Support ticket by emailing support@iterable.com? Including the Template ID or URL that you are working on will help us jump right into it for you!
When looking into more complex data fields, I like to use the _#ifContains_ handlebar method.
Example:
```
{{#ifContains emailListIds '12345'}}
Show content for users in list 12345
{{else}}
Show content for users who are not in that list
{{/ifContains}}
```
Handlebar doc link: https://support.iterable.com/hc/en-us/articles/205480365-Personalizing-Templates-with-Handlebars-#check-for-an-item-ifcontains
If this doesn't fully help, could you create a Support ticket by emailing support@iterable.com? Including the Template ID or URL that you are working on will help us jump right into it for you!
Reply
Create a new Iterable Plaza community account
Already have an account? Login
Login to the Iterable Plaza Community
Not a customer? Create an account
Log in to Iterable (SSO)
Iterable customers and employees login/create an accountor
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.