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!

Formula to truncate text in a field 1

Status
Not open for further replies.

jfokas

Programmer
Apr 28, 2002
42
0
0
I need to create a formula that will return all the text in field up to a specific phrase, in this case "Cinincal Summary". Can someone offer some guidance?

Thanks,
 
This should do it. If it doesn't find "Clinical Summary" in the field, it displays the field as is:
[tt]
if InStr({Table.Field}, "Clinical Summary") = 0 then
{Table.Field}
else
Left({Table.Field}, InStr({Table.Field}, "Clinical Summary") - 1);
[/tt]
-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top