CMS Development

mikemaynard
Participant

Split(..) filter bug report in Email Module

SOLVE

There appears to be a bug in the split(...) filter when using the email module. The following code will split the contents of a HubSpot property correctly on a Landing Page, derlivering a bulleted list of the contents using semicolons as separators, but the exact same code and contact property data does not split the contents of the contact property in the email module

 

{% set string_to_split = contact.industry %}
{% set names = string_to_split|split(';', 9) %}
<ul>{% for name in names %}
<li>{{ name }}</li>{% endfor %}
</ul>

 

I've posted this as a bug report after discussing the problem in a separate thread. https://community.hubspot.com/t5/COS-Design-Support/Can-t-get-HUBL-Split-function-working-properly/m...

0 Upvotes
1 Accepted solution
ndwilliams3
Solution
Key Advisor

Split(..) filter bug report in Email Module

SOLVE

It's not a bug. Filters cannot be used with contact/company properties in email templates.

I worked on trying to use filters in email templates for hours until I read it in the docs.

 

"Please note that using filters on personalization variables (contact and company variables) is not currently supported for email in HubSpot. Filters can be applied to these properties on COS page and blog templates."

View solution in original post

3 Replies 3
ndwilliams3
Solution
Key Advisor

Split(..) filter bug report in Email Module

SOLVE

It's not a bug. Filters cannot be used with contact/company properties in email templates.

I worked on trying to use filters in email templates for hours until I read it in the docs.

 

"Please note that using filters on personalization variables (contact and company variables) is not currently supported for email in HubSpot. Filters can be applied to these properties on COS page and blog templates."

mikemaynard
Participant

Split(..) filter bug report in Email Module

SOLVE

Thanks - I've also subsequently found that out. It's really frustrating, but I've been told there is no chance of a change in the near future.

0 Upvotes
ndwilliams3
Key Advisor

Split(..) filter bug report in Email Module

SOLVE

It's frustrating for sure!  This functionality would definitely make my life easier.

0 Upvotes