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

Splitting a Name 1

Status
Not open for further replies.

Kivairu

MIS
Mar 18, 2009
106
KE
I have a report with the following kind of headings.

"Tuition - Computer Fee"
"Interest Income"

I want to be left with "Tuition" and "Interest Income" as the heading but when I put the formula.

split({yourfield}, "-")[1]

It gives an error "A subscript must be between 1 and the size of the Array
 
Your formula would return the sample values you show above, so I think you must have a null somewhere. Try this:

if isnull({table.field}) then
"Unknown" else //or ""
trim(split({table.field}, "-")[1])

Trim() will remove extra spaces.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top