cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2205
Views
40
Helpful
6
Replies

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

rsnook
Level 1
Level 1

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

Aaron Harrison
VIP Alumni
VIP Alumni

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

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: