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

Split Formula used in a group 1

Status
Not open for further replies.

O2BNSV

Technical User
Jun 29, 2006
104
US
I am using a field called solicitor for the 1st group in a report I am writing. I am trying to use a split formula to extract just the first name out of the string. Each solicitor is separated by a semi-colon:

split({action.solicitor},";")[1]

This formula works if I put it in the detail, but when I try to use it as a group formula, I get an error saying:

"a subscript must be between 1 and the size of the array"

The size of the array varies. There can be an infinite number of solicitors assigned to an action. Is there a way to extract the first solicitor out of the string in such a way that the formula can be used as a group formula? By the way, I am using v2008.

 
It sounds like you have cases where there is no semicolon. Try:

if instr({action.solicitor},";") <> 0 then
split({action.solicitor},";")[1] else
{action.solicitor}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top