cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
569
Views
5
Helpful
1
Replies

Parse data with UCCX 7

I am opening this to the forum, as I am stuck. I get a value from the database, a 9 digit number, "033355555" and plug it into a string variable. It is a 9 digit number when I get it. I need to be able to strip the leading zero, put the next 3 numbers in variable and the remaining 5 in another to read them back to a caller. Any thoughts on this would be great!

Bill

1 Reply 1

molivere17982
Level 1
Level 1

Bill,

You need to use substring.

Look at my example below, it cuts out the first digit and the last 5 putting "333" in the variable firstThree and the second Set command chops off the first four digits and puts them in the variable otherFive.

Start

Set firstThree = db_string.substring(1, 4)

Set otherFive = db_string.substring(4)

End

Name Type Value Attributes

db_string String "033355555"

firstThree String ""

otherFive String ""

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: