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

extracting values from strings

Status
Not open for further replies.

EBH

IS-IT--Management
Apr 26, 2006
6
US
I need help extracting values from text strings in memo fields. The example below shows a persons name that I want to pull out and an account number. The text string is consistent for all records.
I am using version 8.5 of Crystal.

Example of memo field-
Funding Authority: John Doe
Funding Account #: 12345

Thanks much.
 
There are a few approaches here:

Name:
stringvar MyField:= mid({table.field,19);
split(MyField,"Funding Account #: ")[1]

Account:
stringvar MyField:= mid({table.field,19);
split(MyField,"Funding Account #: ")[2]

You might have to adjust the 19, that's just how we get rid of the Funding Authority text, then you create an array using Funding Account # as the delimiter, and reference 1 or 2 of the array.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top