08-24-2011 03:39 AM - edited 03-14-2019 08:25 AM
Hello Everybody,
I have big problem with one small part of my script in UCCX 8.5 (Std).
I have one String = "aaa,bbb" and I want to split it to two strings first "aaa" and second "bbb"
I set new variable: String one dimension array.
When I add "Set myStringArray = myString.split(",")",
my script has completly dead, I cant debug it, and after some seconds I hear error message.
What is bad with this line of code?
Regards.
Solved! Go to Solution.
08-24-2011 07:09 AM
My guess: You're running UCCX Standard, which does not allow the use of Java methods.
Example:
This is ok in Standard:
my_date.year
This is NOT ok in Standard:
my_date.getYear()
08-24-2011 05:27 AM
Your MIVR logs will contain EXCEPTION blocks when the step is executed. These should tell you what the issue is.
It might be a license thing if you have a lower edition of UCCX, or perhaps you need to declare the array before the split step:
String[] myStringArray = new String[2]
Seems odd (you would kind of imagine that the myStringArray pointer would be set to whatever new array is created by the .split, but I think I remember it not working like that).
Aaron
08-24-2011 05:47 AM
Thank you aaronharrison for quick reply.
I'm still reading documentation and digging in net, and few minuts ago I added:
Do myStringArray = new String[2]
Exactly as you wrote:)
I checked that I can put some data in particular variable in array, as example.
Set myStringArray[0] = "something"
and it works fine, but "split method" doesnt works.
Could you please tell me something about how to get logs and exceptions?
Best Regards.
08-24-2011 06:13 AM
I checked something else (testNumber is int)
Set testNumber = myString.length()
It's not works, script is dead like before.
Regards.
08-24-2011 06:34 AM
Check the logs then. Install RTMT from Applications/Plugins in the web interface, and then use 'trace and log central' to retrieve the logs for the UCCX engine.
Post up the relevant portion if you don't understand them.
08-24-2011 07:09 AM
My guess: You're running UCCX Standard, which does not allow the use of Java methods.
Example:
This is ok in Standard:
my_date.year
This is NOT ok in Standard:
my_date.getYear()
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