⚙ Operations Hub

JoshuaW
Contributor

Replace multiple semicolon separated values within a single text property

SOLVE

We have need to update a semicolon separated list string that is within a single text property by removing multiple values from the string.

 

I've gotten as far as removing a single value using a workflow with the following steps:

 

  1. Copy multi-checkbox property to a single line text property. (puts it in as a semi-colon separated list)
  2. Use Format Data step to “replace” the text string value with nothing. replace([enrolled_object.marketing_newsletters_restore2],"daily_update_memphis;","")
  3. Set the same single line property with the new value from the previous format action.
  4. Use Custom code action to output the single line text value as an enumeration.
  5. Set intial multi-checkbox property with the new value from the previous custom code enumerated output.

The above works, but I can’t figure out how to “replace” more than one value in step 2. I’m sure that is possible using custom code, but I’ve not been able to figure it out.

0 Upvotes
1 Accepted solution
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Replace multiple semicolon separated values within a single text property

SOLVE

Hi @JoshuaW,

 

Just to confirm, a HubSpot single-line property has, for example, the value 'A;B;C;D' and you want to translate this into another property (multiple checkboxes, one checkbox for each letter of the alphabet, hypothetically) where then 'A', 'B', 'C', 'D' are checked?

 

Could you share a bit more context? What exactly is populating the single-line text property, where is it drawing data from? What is ACBJ Newsletters? Why would you copy from a property in step 1, then copy into the same property again in step 5?

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

View solution in original post

0 Upvotes
1 Reply 1
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Replace multiple semicolon separated values within a single text property

SOLVE

Hi @JoshuaW,

 

Just to confirm, a HubSpot single-line property has, for example, the value 'A;B;C;D' and you want to translate this into another property (multiple checkboxes, one checkbox for each letter of the alphabet, hypothetically) where then 'A', 'B', 'C', 'D' are checked?

 

Could you share a bit more context? What exactly is populating the single-line text property, where is it drawing data from? What is ACBJ Newsletters? Why would you copy from a property in step 1, then copy into the same property again in step 5?

 

Best regards

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

0 Upvotes