cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Walkthrough Wednesdays
1724
Views
40
Helpful
6
Replies
rsnook
Beginner

escape character not working in UCCX 7. Need quote in string.

using expression editor trying to do something like this:

{sString = "\"[parameter]\":\"[value]\"";}

hoping to have sString equal this:     "[parameter]":"[value]"

it appears to not be recognizing the \ as an escape character. any thought?

6 REPLIES 6

Hi

I think I recall having to put the escaped chars in as individual characters. There may be a better way... but then there are also better UCCX folks than me :-)

Try:

sString =  '\"' +"[parameter]" + '\"' +":" + '\"' + "[value]" + '\"'

(intentional single quotes round the escapees)

Regards

Aaron

Please rate helpful posts..

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

"but then there are also better UCCX folks than me :-)"

few and far between. THANKS!!

It doesn't look good though does it?  You just know you must be missing something when it has so much typing for such a simple thing?

:-(

Aaron

Aaron Please remember to rate helpful posts to identify useful responses, and mark 'Answered' if appropriate!

{sComments = "{"+ '\"'+"message"+ '\"'+":"+ '\"'+ sComments + '\"'+"}"; }

what's ugly about that?? it's just ugly after the = sign ... thanks again.

Didn't need a quote in my string, but the syntax helped me from beating my head against my desk.

Thanks aaronharrison

Filippo Zangheri
Beginner

Maybe this can help others.

 

At least from CCX 9.0 you can achieve the goal by creating the string with u prefix (which means "extended string literal"), e.g.:

 

set string = u"\"alfa\", \"bravo\", \"charlie\""

 

--

Filippo

Content for Community-Ad

Spotlight Awards 2021