Script Dynamics Variable, Split a text

Hello Everyone

I have a text string like "text1,text2,text3,text4" in a variable in the Script. I need to separate this text string, (or generate an array) to access each element separated by the comma (,). Is it possible to do this using a dynamic variable? Is there a function that allows to do this task?

For example, in architect we can use split("text,text", ","). Can we do something like that in the script?

Each text or element has an unknown number of characters.

Thanks for your help.

You can use a combination of indexOf and substr or slice to split based on a comma. https://help.mypurecloud.com/articles/additional-functions-to-use-in-dynamic-variables/

Thank you for your response, Tim. I did it.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.