How to convert a Memo to string?

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
Gail_Knowles_(Guest)
Posts: 5
Joined: Tue Oct 10, 2017 12:44 pm

How to convert a Memo to string?

Post by Gail_Knowles_(Guest) » Mon Jul 20, 2009 4:29 pm

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?

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> How to convert a Memo to string?

Post by kfleming » Tue Jul 21, 2009 2:59 pm

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

Gail_Knowles_(Guest)
Posts: 5
Joined: Tue Oct 10, 2017 12:44 pm

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

Post by Gail_Knowles_(Guest) » Tue Jul 21, 2009 3:15 pm

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!__

Gail_Knowles_(Guest)
Posts: 5
Joined: Tue Oct 10, 2017 12:44 pm

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

Post by Gail_Knowles_(Guest) » Wed Jul 22, 2009 11:19 am

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?

Post Reply