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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split one field into two using a character symbol

Status
Not open for further replies.

irishmick

Technical User
Sep 7, 2011
1
0
0
IE
I am looking for help with a formula. Our program contains a description field which will contain desc such as "00100 - Torch". Our existing report contains one desc field showing the full desc. I need to be able to split this field into two seperate fields for Code and Description. The constant seperator will always be the - symbol.

Any help appreciated?.
 
//{@first element}:
split({table.field}," - ")[1]

//{@second element}:
if ubound(split({table.field}," - ")) >= 2 then
split({table.field}," - ")[2]

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top