# Splitting appended property value

**URL:** <https://community.hubspot.com/t/splitting-appended-property-value/128214>\
**Category:** Data Hub\
**Created:** [March 18, 2025, 10:29pm UTC](https://community.hubspot.com/t/splitting-appended-property-value/128214 "2025-03-18T22:29:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas11](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Andreas11](https://community.hubspot.com/u/Andreas11)\
**Post date:** [March 18, 2025, 10:29pm UTC](https://community.hubspot.com/t/splitting-appended-property-value/128214/1 "2025-03-18T22:29:07Z")

</div>

Hi!  
In our **Contact Object** we have a single-line text property called Company\_Qcode in which the values can look like this:  
{SECLNT10034182}  
or… like this:  
{SECLNT87247981,SECLNT89752329}  
If there are mutliple ones like in the last example, is it possible to split these based on the “ **,** ” separator and place each in its own separate property through custom code? So we’d end having 2 properties like this as well:  
Company\_Qcode **1** = SECLNT87247981  
Company\_Qcode **2** = SECLNT89752329  
The reason we need to split them is that we use these values as the assocation key across objects and its records through association workflows.  
Any help would be incredibly appreciated!  
Thanks

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [March 19, 2025, 5:07am UTC](https://community.hubspot.com/t/splitting-appended-property-value/128214/2 "2025-03-19T05:07:54Z")

</div>

Hi @Andreas11,

If you have Operations Hub Professional or Enterprise, this can be achieved either with the format data workflow action (specifically the regex replace function) or with a custom code action.

 ![karstenkoehler_0-1742360787504.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/d/dd0d176090e1026e601f2d0ee434e49f8c173573.png)

> **[Workflows | Custom Code Actions - HubSpot docs](https://developers.hubspot.com/docs/api-reference/legacy/automation/workflow-actions/custom-code-actions)**
>
> Instructions for using custom code actions in workflows

In both cases, generative AI (like ChatGPT) should be able to assist with the actual code – although much less code will be needed for the regex\_replace. The downside of regex\_replace is that you would need one action per code – which might make it a bit unflexible.

Best regards

---

<div class="post-metadata">

**Author:** ![Andreas11](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Andreas11](https://community.hubspot.com/u/Andreas11)\
**Post date:** [March 20, 2025, 1:17am UTC](https://community.hubspot.com/t/splitting-appended-property-value/128214/3 "2025-03-20T01:17:36Z")

</div>

Hi Karsten,  
You’re an absolute lifesaver, got it to work just like I needed it to!  
Thank you so much!
