Helper funtion split | Community
Skip to main content
Level 1
January 27, 2026
Question

Helper funtion split

  • January 27, 2026
  • 1 reply
  • 19 views

I want to use the split helper function in Adobe Journey Optimizer to separate a phone number coming from a journey event into multiple parts. The phone number is stored in the field context.journey.events.1278567881._floridapowerandlight.journey.additionalPhone, and my goal is to split this value using a delimiter (for example, -) so I can access each segment individually. However, I am encountering syntax errors when trying to use the split() function, which indicates that the field or context where I am applying it does not support PQL expressions.

I need this result
(234-456-7890)

1 reply

DavidKangni
Community Advisor
Community Advisor
January 27, 2026

@Jorge1111 

when using helper functions with events fields you need a quote

context.journey.events.`1278567881`._floridapowerandlight.journey.additionalPhone

 

Thanks,

David Kangni
Jorge1111Author
Level 1
January 27, 2026

This is the formula, that im using but is not working

substr(context.journey.events.`1278567881`._floridapowerandlight.journey.additionalPhone, 0, 3) + "-" + substr(context.journey.events.`1278567881`._floridapowerandlight.journey.additionalPhone, 3, 3) + "-" + substr(context.journey.events.`1278567881`._floridapowerandlight.journey.additionalPhone, 6, 4)

Mohan_Dugganab
Adobe Employee
Adobe Employee
January 29, 2026

You can validate it on the following lines 

{% let additionalPhone = context.journey.events.`1278567881`._floridapowerandlight.journey.additionalPhone %}

{% let firstPart = substr(additionalPhone, 0, 3) %}
{% let secondPart = substr(additionalPhone, 4, 7) %}
{% let thirdPart = substr(additionalPhone, 8, 12) %}

{%= concat(concat(concat(concat(firstPart,"-"),secondPart),"-"),thirdPart) %}