Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

split data field with '/' as deliminter in data 1

Status
Not open for further replies.

jmfox2

Programmer
Jan 24, 2003
7
US
field value="level1/level2/level3/level4"

i need to be able to create separate fields for each of the levels.

field1="level1"
field2="level2"
field3="level3"
field4="level4"

thanks. used to do CR alot, 5 year lapse and I find myself a little more than rusty.
 
Try:

split({table.field},"/")[1]

Increment the 1 subscript for each additional value in the other formulas.

-k
 
Create a formula for each field as below:

// formula @Level1
If UBound(Split({table.Levels})>= 1 then
Split({ESHINFOR.DESCRIPTION})[1] else
""

// formula @Level2
If UBound(Split({table.Levels})>= 2 then
Split({ESHINFOR.DESCRIPTION})[2] else
""

MrBill
 
Correcting MrBillSC's formulas:

// formula @Level1
If UBound(Split({table.Levels},"/")>= 1 then
Split({ESHINFOR.DESCRIPTION},"/")[1] else
""

-k
 
Another correction:

// formula @Level1
If UBound(Split({table.Levels},"/")>= 1 then
Split({table.Levels},"/")[1] else
""

// formula @Level2
If UBound(Split({table.Levels},"/")>= 2 then
Split({table.Levels},"/")[2] else
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top