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!

Extracting specific information from field, disregard the rest - how? 1

Status
Not open for further replies.

Drakhan

Technical User
Jun 3, 2002
67
US
Can this even be done? Please read below...

I have data in a field that must be extracted out and only a portion of it used. Unfortunately, this field is the only field that contains the data needed. Here is an example:

The field name, for example, is {CONTACT.REFERENCE}. When displayed in the report it looks like this:

INFO - First meeting with client (oc:John Q. Public)

What I would like to do is just capture the name from that field above. Ideally John Q. Public would be displayed for {CONTACT.REFERENCE}, rather than all other information.

Any ideas? Thank you so much!!!
 
Will the info you want to get to always be at the same starting character and have a trailing closed paren ")" ?

If so the following should work:
Mid({CONTACT.REFERENCE},38,length({CONTACT.REFERENCE})-39)

Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Assuming "oc:" always appears just before the name,
this should work:

MID({CONTACT.REFERENCE},
InStr ({CONTACT.REFERENCE}, "oc:")+3,
Length({CONTACT.REFERENCE})-
InStr({CONTACT.REFERENCE}, "oc:")-3)

Cheers,
- Ido CUT (Crystal UTilities): e-mailing, exporting, electronic bursting & distribution of Crystal Reports:
 
Thanks guys for the insight! Extremely helpful!! I would have never figured that one out on my own :( Glad to have you all around!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top