Parse data with UCCX 7

Unanswered Question
Jun 12th, 2009

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

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
molivere17982 Fri, 06/12/2009 - 18:13

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 ""

Actions

This Discussion