01-25-2019 04:19 AM - edited 03-14-2019 06:44 PM
Hey gang,
I'm looking for a way to set the value of a variable to match a specific digit of "Original Called Number" as returned by the Get Call Contact Info step. It's pretty easy to set the variable to match the whole thing of course, but what if I want it to match, say, just the 4th digit?
For example, caller dials 202-123-9999. I want to set the variable named "FourthDigit" to match the 4th number of the called number, in this case, "1".
Any ideas?
Thanks!
Solved! Go to Solution.
01-25-2019 06:09 AM
You can use the <variable>.substring(6,9) option to get the last 4 digits from 10 digit number.
01-25-2019 06:09 AM
You can use the <variable>.substring(6,9) option to get the last 4 digits from 10 digit number.
01-25-2019 11:35 AM
That put me on the right track, thanks Chris! To clarify a bit more, since I wanted to get the value of a specific digit, I used adjacent index numbers, like so:
Set DNIS3rdDigit = DNIS.substring(2,3)
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