cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

AMA-CUCM Troubleshooting: Best Practices for Reading Trace Files

1445
Views
35
Helpful
6
Replies
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

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

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!
Beginner

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

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

few and far between. THANKS!!

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

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!
Beginner

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

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

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

Enthusiast

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

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

Thanks aaronharrison

Highlighted

Maybe this can help others.

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

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards