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 formula to extract text from a memo field

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I have a memo field that has a string that I want to capture that is a specified number of characters after a specific string.

Memo field example:


a:8{s:15:"info_buyRequest";a:9:"aHR0cDovL2IyY4OC8{s:4:"uenc";s:108:,";s:7:"product";"options";a:1:{i:0;a:6:{s:5:"label";s:27:"Your Store Number - 6 digit";s:5:"value";s:6:"123456";s:9:"option_id";}
{s:5:"label";


I want to extract the "123456" from this memo which is the answer to "Your Store Number - 6 digit"

 
If the the number is always preceded by the code "s:6", then you could do something like this.

mid({somefield}, instr({somefield},'s:6:')+5), 6)

I am not sure if the embedded double quotes will cause an issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top