cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
224
Views
0
Helpful
3
Replies

String parsing in Webex Flow Designer

rbroersma
Level 1
Level 1

Hello,

Looking for some help on parsing a string in webex contact center flow designer.  I have a string variable that looks something like this..

xxxxxxxxx;yyyyyyyyyy

I'm trying to parse the string to just get the values prior to the ';' (so all the x's).  

I'm using the following formula in my set node but it's failing (vVariable is the variable described above)....

{{substring(vVariable, 0, (indexOf(';',vVariable)-1))}}

Thanks for any help.

Ryan

3 Replies 3

If this is for WebexCC, wouldn't you use a function like slice in pebble to get you what you want?

gkovanis
Cisco Employee
Cisco Employee

Hello @rbroersma ,

Using pebble, you can use a function similar to the below to retrieve what you want:

{{vVariable | split(';') | first }}


 

wajidhassan
Level 4
Level 4

Hi @rbroersma ,

In Webex Flow Designer, the correct syntax for indexOf is indexOf(vVariable, ';') (variable first, then the character). Also, to include all characters before the semicolon, you don't need to subtract 1.

Try this instead:

{{substring(vVariable, 0, indexOf(vVariable, ';'))}}

This will extract everything before the semicolon.

Hope this helps!