Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

UCCX String variable manipulation

A script I'm writing is choosing a language for prompts and variables based on DNIS. So, simple DNIS switch statement sets the string sLocation variable as "country". 

Now, my problem comes in where I want to call variables based on a variable. Example:

 

US_Operator = "8888"

MX_Operator = "9999"

 

Switch (DNIS) {

"1234" { set sLocation = "US" }

"5678" { set sLocation = "MX" }

};

sOperator = sLocation + "_Operator"

Call Redirect [sOperator]

 

Now with my example sOperator ends up being "US_Operator" and not the VALUE of the variable US_Operator which is 8888. I've tried the String.valueOf(sLocation + "_Operator") and all variances of, but I can't get the sOperator variable to = 8888 correctly.

 

What am I missing?

1 REPLY

Hi, I am afraid it does not

Hi, I am afraid it does not work that way.

Is there any reason you don't want to include setting the value of the sOperator variable within the code block where you are setting the value of sLocation?

G.

180
Views
0
Helpful
1
Replies