11-01-2012 09:51 AM - edited 03-14-2019 10:46 AM
[string] Variable1 = "/*"
[string] Variable2 = "4340"
I would like to combine these 2 Variables and set it to a 3rd Variable using the Set Step. So the final outcome would look like the following...
[string] Variable3 = "/*4340"
Here is what I have which is not working.
Set Variable3 = Variable1 + Variable2
11-01-2012 10:07 AM
Hmm. I don't see the reason why but I at this moment I cannot test it myself.
Try Variable3 = Variable1.concat(Variable2)
Or, use this code block for Variable3:
{
StringBuilder buffer = new StringBuilder(50);
buffer.append(Variable1);
buffer.append(Variable2);
return buffer.toString();
}
HTH.
G.
11-01-2012 10:10 AM
I've seen this come up a few times with various versions of the platiform. In most cases something like:
Set Variable 3 = Variable1 + "" + Variable2
Should fix it. If that doesn't work and you have premium license you can use the concat method.
Tanner
11-01-2012 12:50 PM
Sorry guys. I actually had it correct. This is how I verified it.
Open CCX Editor without loading a script. Then, in the Debug menu choose Reactive Script. Choose your Script for the Script Name and then choose a timeout value. (I choose 15secs)
Dial the number that triggers the script. Click on Debug and Insert a Breakpoint before the End Step. Now click on Debug and start Debugging. Once the script hits the Breakpoint, click on the Debug menu again and choose Evaluate. You can now select your Variable and evaluate its value.
I noticed that I was using a / (forward slash) instead of a \ (back slash) as the escape character. I was combining my two variables but using the wrong slash. Oops. Thanks for the help though. I now see there are more than one way to accomplish this.
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