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

2709
Views
0
Helpful
5
Replies
pciborowski
Beginner

UCCX Script problem

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Anthony Holloway
Cisco Employee

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()

View solution in original post

5 REPLIES 5

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

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

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.

I checked something else (testNumber is int)

Set testNumber = myString.length()

It's not works, script is dead like before.

Regards.

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.

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

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()

View solution in original post

Create
Recognize Your Peers
Content for Community-Ad