12-20-2011 11:26 AM - edited 03-14-2019 09:04 AM
Currently have a UCCX script that will be performing a DB lookup based on ANI, however, I've noticed that when my ANI comes in it is prefaced with a "91". Rather than try and reconfigure what the gateway is accepting, I am wondering if it is possible to strip those 2 digits with Java language before sending it into the DB Read step using a Set command...I'm not too familiar with Java coding...Is this possible?
Thanks
Solved! Go to Solution.
12-20-2011 11:57 AM
Hi
You can insert some Java for this... try something like this in a 'do' step (yourvariable swapped for your string var name containing ANI):
{if (yourvariable.startsWith("91"){
return = yourvariable.substring(2,yourvariable.length());
}
}
Aaron
12-20-2011 11:57 AM
Hi
You can insert some Java for this... try something like this in a 'do' step (yourvariable swapped for your string var name containing ANI):
{if (yourvariable.startsWith("91"){
return = yourvariable.substring(2,yourvariable.length());
}
}
Aaron
12-20-2011 11:59 AM
put your ani in a variable called AniStr and use the following in your set step
AniStr.substring(2)
Brian
edit - or what Aaron says
12-20-2011 12:16 PM
Thanks to both of you...will use Brian's in the event all numbers come in with "91" prepended and jump to Aaron's if they do not
09-29-2015 04:26 AM
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