Page 1 of 1

How to convert a Memo to string?

Posted: Mon Jul 20, 2009 4:29 pm
by Gail_Knowles_(Guest)
I need to parse data that is in a memo field. I thought I could use some of the R&R string functions, but evidently they won^t work with a memo field - so how do I convert a memo to a string? Or is there a better way?

=> How to convert a Memo to string?

Posted: Tue Jul 21, 2009 2:59 pm
by kfleming
In the Xbase version the only thing that you can do is test whether a memo contains a particular text string.__In the SQL version memos are treated as character fields so you can use character functions. So that might be a possible way to get what you need.____Kathleen__R&R Support

==> RE: How to convert a Memo to string

Posted: Tue Jul 21, 2009 3:15 pm
by Gail_Knowles_(Guest)
Rats. We are using version 11, XBase. ____The data looks different depending on whether I use Excel, Notepad, or display, but this is a sample of the data I am trying to work with:____[PARAMETER1]Value = 0InputMask = 99999.99Caption = Max. Family Deductible[PARAMETER2]Value = 1000InputMask = 99999.99Caption = Max. Family Out-of-Pocket____What I actually need to pull out are the 2 values _ immediately following the text "Value = ". I already know the memo field conatins the text "Value = ". __Can you think of any way to pull out the values?____I would appreciate any hints you might have!__

===> RE: How to convert a Memo to string

Posted: Wed Jul 22, 2009 11:19 am
by Gail_Knowles_(Guest)
Looking for suggestions on a better way to do this:____I have my memo field: PPTBLAINFO__Then__I have a series of __Val100=IIF(PPTBLAINFO="*Value = 100I*",1,0)__Val250=IIF(PPTBLAINFO="*Value = 250I*",1,0)__Val400=IIF(PPTBLAINFO="*Value = 400I*",1,0)__(etc)__Then I have one horrendous conditional statement, that needs to include all the Vals (there will be at least 10 Vals):____PrintValue=IIF(Val100=1,100,IIF(Val400=1,400,IIF(Val500=1,500,IIF(Val1000=1,1000,0))))____PrintValue does end up with what I need on the report, but this is ugly. Suggestions anyone?