|
Home > Archive > Programming with dBASE > February 2006 > memo field value to character field
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
memo field value to character field
|
|
| Moses Hanna 2006-02-14, 9:23 am |
| Hi
I have a table with a memo field containing data for each row in several
lines in the editor
In a form I want to display the memo data in a calculated character field.
withing the data comes ( after each line ) 2 boxes shaped characters for the
return key(s)
How can I get rid of those boxes
I tried to implement the stuff() function withing the beforegetvalue, but it
is not doing anything.
any help?
Moses
| |
| Howard Mintzer 2006-02-14, 1:23 pm |
| Here's what I do Moses,
I use stripchar function from stringes.cc in the duflp
cMystring=trim(form.editor.value)
s=new stringex()
cMystring=s. stripChar(cMystring,
chr(10),false) //get rid of the
carriage returns
cmystirng=s. stripChar(cMystring,
chr(13),false) //get rid of line feed
Good Luck
Howie
Moses Hanna wrote:
> Hi
> I have a table with a memo field containing data for each row in several
> lines in the editor
> In a form I want to display the memo data in a calculated character field.
> withing the data comes ( after each line ) 2 boxes shaped characters for the
> return key(s)
> How can I get rid of those boxes
> I tried to implement the stuff() function withing the beforegetvalue, but it
> is not doing anything.
> any help?
> Moses
>
>
| |
| Moses Hanna 2006-02-15, 3:23 am |
| Good day Howie
my character field to get the values of a memo field is a calculated field
created in the query's on open event
function messages2_onOpen
f = new Field()
f.fieldName := "MsgText"
f.length = 150
f.readOnly := true
f.beforeGetValue := {|| this.parent["message"].value}
this.rowset.fields.add( f )
return
I tried the following
function messages2_onOpen
f = new Field()
f.fieldName := "MsgText"
f.length = 150
f.readOnly := true
set procedure to stringex.cc additive
cMystring=trim( this.parent["message"].value)
s=new stringex()
cMystring=s. stripChar(cMystring,
chr(10),false) //get rid of the >
carriage returns
cmystirng=s. stripChar(cMystring,
chr(13),false) //get rid of line feed
f.beforeGetValue := {|| cmystring}
this.rowset.fields.add( f )
return
It gives me error message
Thanks for your help
Moses
"Howard Mintzer" <hmintzer@optonline.net> wrote in message
news:uNMKNOZMGHA.560@news-server...
> Here's what I do Moses,
> I use stripchar function from stringes.cc in the duflp
> cMystring=trim(form.editor.value)
> s=new stringex()
> cMystring=s. stripChar(cMystring,
chr(10),false) //get rid of the >
> carriage returns
> cmystirng=s. stripChar(cMystring,
chr(13),false) //get rid of line
> feed
>
> Good Luck
> Howie
>
| |
| Michael Nuwer [dBVIPS] 2006-02-15, 7:23 am |
|
Maybe the modifications below will help.
Moses Hanna wrote:
> I tried the following
> function messages2_onOpen
> f = new Field()
> f.fieldName := "MsgText"
> f.length = 150
> f.readOnly := true
f.beforeGetValue := class::getString
this.rowset.fields.add( f )
set procedure to stringex.cc additive
return
function getString
local cMyString, s
cMystring=trim( this.parent["message"].value)
s=new stringex()
cMystring=s. stripChar(cMystring,
chr(10),false)
cmystirng=s. stripChar(cMystring,
chr(13),false)
return cmystring
|
|
|
|
|