08-01-2013 07:40 AM - edited 03-14-2019 12:09 PM
UCCX 8.5.1.10000-37
UCCX Editor v 8.5(1.0)
I know several have commented on the ugly printing from the Script Editor but here is a simple example which I will forward as an SR to TAC:
The above script with a Set statement for a string variable prints the following:
08-01-2013 07:45 AM
FYI - SR # 626853703.
08-01-2013 08:35 AM
Is there a reason you are using Document object Text literals to build a String? Seems very ineffecient to me. You are basically instantiating six Document objects, and then casting them to Strings. This makes UCCX work harder than it needs to.
The above example could be simplified with the following, which is less processor/memory heavy than using Documents, and also has the benefit of printing a little nicer:
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
08-01-2013 10:02 AM
Anthony,
Thanks for the suggestion. I was originally having some issue which I've since forgotten about with single and double quotes and 'discovered' the Text[] construct as a fix.
I'll go back and make the changes you've suggested to my http/html code in my script.
Thanks,
Bill
08-01-2013 10:22 AM
Yeah that can be a pain. If you google how to include quotes inside of a Java String you will see that the syntax is as simple as:
String my_string = "This is a \"quoted\" word inside a string.";
However, if you try to do that in the editor, it will raise an exception:
Unable to parse expression; un-terminated string: " (line: 1, col: 4)
So the way you have to do it is with the little "u" trick, which allows escape characters in the String.
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
08-01-2013 11:10 AM
I converted my strings from the Text[] style and things are working well with the u"...." where needed.
Printing is still messed up tho. I also tried the Reduce (F9 I think) in the value field editor to get the assignments down to a single (unreadable) line and printing is still bad. Just looks like the print function has difficulty with long lines and wrapping them onto the printed page.
anthony - thanks again for educating me on the quoted strings.
08-01-2013 01:27 PM
You're welcome. For what it's worth, you educated me on the Reduce feature (it is F9). I have never used that before. It then inturn introduced me to the Protect and Parse as well. So, in a way, I learned more from you, then you did from me! Thank you!
Anthony Holloway
Please use the star ratings to help drive great content to the top of searches.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide