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

Crystal 2011 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I have a field that contains notes:

I want to be able to pull a specified number of characters that come after a phrase Field example: 'Enter your 6 digit store number here: 123456, In home date is 12/20/2018)

This field will sometimes not have the enter your 6 digit store number here, so I want a formula that will display only the 123456 for fields that include the 'enter your 6 digit store number here:' and blank for ones that do no include this phrase.



 
If {table.note} startswith “Enter your 6 digit store number here:” then
Mid({table.note},instring({table.note},”:”)+2) else
{table.note} //or “” if you don’t want a record to appear at all if it doesn’t start with the phrase.

-LB
 
LB,

I am getting closer but I am still getting all of the characters after the 6 digit store number. So I am getting 123456, In home date is 12/20/2018 but I only want 123456.

So I only want the next 6 characters after the : +2 .

Thank you for all the help you have given me over the years!!!
 
Mid({table.note},instring({table.note},”:”)+2,instring({table.note},”:”)+7)

There are other ways of doing this also, e.g., using extractstring, but this should work. I didn’t realize you ONLY wanted the store number.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top