# Can't get HUBL Split function working properly

**URL:** <https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498>\
**Category:** CMS Development\
**Created:** [June 23, 2017, 10:16am UTC](https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498 "2017-06-23T10:16:07Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![mikemaynard](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mikemaynard/32/29368_2.png) [@mikemaynard](https://community.hubspot.com/u/mikemaynard)\
**Post date:** [June 23, 2017, 3:16pm UTC](https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498/21 "2017-06-23T15:16:45Z")

</div>

@Jsum - replying separately to the comment about arrays:

In both cases I am creating a string called string\_to\_split and then creating an array using split(…). When I assign the string using “…” it works perfectly. When i assign the string using the contact property it does not. In both cases I have \*definitely\* assigned a string (checked using pprint) and in both cases the string \*definitely\* looks the same (again checked using pprint as well as displaying the variable). But in one case the split(…) produces an array and in the other it does not. If I could produce an array when using the contact property I completely agree that displaying the elements is trivial.

Thanks

Mike

---

<div class="post-metadata">

**Author:** ![EricSalvi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ericsalvi/32/61601_2.png) [@EricSalvi](https://community.hubspot.com/u/EricSalvi)\
**Post date:** [June 23, 2017, 2:47pm UTC](https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498/22 "2017-06-23T14:47:16Z")

</div>

@mikemaynard  
Maybe before the |split filter, I have had success in the past with others to squeeze in the |string filter first. Could look like this

`string_to_split|string|split(';', 9)`

Maybe that will work?  
@Jsum I can see he already showed the example output in the initial question.

---

<div class="post-metadata">

**Author:** ![mikemaynard](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mikemaynard/32/29368_2.png) [@mikemaynard](https://community.hubspot.com/u/mikemaynard)\
**Post date:** [June 23, 2017, 2:52pm UTC](https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498/23 "2017-06-23T14:52:38Z")

</div>

Thanks for helping @EricSalvi. Unfortunately it didn’t work.

I tried:

{% set names = string\_to\_split|string|split(‘;’, 9) %}

and unfortunately the behaviour is still exactly the same. it splits string\_to\_split when it’s assigned with a constant value, but not with the contact.industry property.

---

<div class="post-metadata">

**Author:** ![Anya23](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@Anya23](https://community.hubspot.com/u/Anya23)\
**Post date:** [December 9, 2025, 8:20pm UTC](https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498/24 "2025-12-09T20:20:45Z")

</div>

In case anyone comes to this years later as I did, I was experiencing the same issue in 2025. The problem was that though I’d created a module for emails, I had not toggled Use programmable email module on:

![Anya23_0-1765311583775.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/8/3888c7c55a03262cf1748387be328912a1938c9d.png)

This probably wasn’t available at the time of the initial post, but this solved the issue of trying to split a contact property string into an array by a delimiter, but having the entire string end up as the single value in the array, instead of being split.

[Previous page](https://community.hubspot.com/t/cant-get-hubl-split-function-working-properly/2498.md?page=1)
