Simplicty and flexibility!


MemoMemoCopy(MemoField,MemoField2,0) - Append to Memo.
MemoMemoCopy(MemoField,MemoField2,1) - Overwrite/Rep
MemoMemoCopy(MemoField,MemoField2,2) - Delete

Insert, append, overwrite or delete the value of a Memo field with the content of another memo field.

In the new Memo class the essence is to be able to manipulate and "play" with memo fields in any way you like. We have MemoCopy() that works the same way as MemoMemoCopy() but it simply appends/copies a normal DataEase field rather than a memo.

MemoMemoCopy() allow you to move the information in Memofields around and merge them together.



This is the destination Memo field which will be either overwritten, appended, inserted or delelted.


This is the value that will be appended or inserted into MEMO FIELD.


This is the switch that will decide wich action the MemoMemoCopy() function will take:

0=Append value to memo field.

1=Overwrite memo field with new value.

2=Delete/Blank Content of memo field.

3=Insert value at beginning of memo field.
4=Append value to Memo with CR in front (Start on new line)
5=Insert value at beginning of memo with CR after.




Example 1 - Append

We have to memo fields.
Memo1: This is Memo1 
Memo2: This is Memo2


Result: This is Memo1This is Memo2

Example 2 - Overwrite

We have to memo fields.
Memo1: This is Memo1 
Memo2: This is Memo2


Result: This is Memo2

Example 3 - Delete

We have to memo fields.
Memo1: This is Memo1 
Memo2: This is Memo2


Result: <blank>

Example 4 - Insert

We have to memo fields.
Memo1: This is Memo1 
Memo2: This is Memo2


Result: This is Memo2This is Memo1

Example 5 

This example is from the Send Advanced E-Mail example in the Default Template.

if (MemoLength(Emailbody)>0,MemoCopy(MailBodyCoded,"<div>",1)+MemoMemoCopy(MailBodyCoded,Emailbody,0)+MemoCopy(MailBodyCoded,"</div>",0)+MemoReplace(MailBodyCoded,chr(13),"<br>")+MemoWriteToFile(LinkedStyles ,MailFile,1)+MemoWriteToFile(MailBodyCoded,MailFile,0)+MemoWriteToFile(MySiignature,MailFile,0),0)

This formula builds the Email body.

If Email body is not ampty >

MemoCopy a start HTML <div>
MemoMemoCopy The content of Emailbody to the new MailbodyEncoded
MemoCopy a end HTML </div>

Then we parse through the New MailbodyEncoded and replace all Text carriage returns with proper HTML <br> line break tags.
Then we write the style header to the filepath stored in virtual field Mailfile with overwrite.
Then we append the Encoded Mail body to the Mailfile.
Then we append the Email signature to the mailfile.

And this is the result. Properly formatted properly styled and with Email signature...Voila!




Memo  Function


This function copies, appends, or inserts a Memo into another Memo. This function will make it possible to build an advanced Memo field from many other Memo field.

Same as MemoCopy, just that it copies Memo fields into Memo instead of normal DataEase field types.



? where MemoTo is the result Memo, MemoFrom is the memo to be copied, inserted or appended.

Switch: 0=Append, 1=Overwrite, 2=Insert at beginning.

An empty string so the function can be used as part of any derrivation without interfering with the derivation result. 


Memo1 contains "DataEase" and Memo2 contains "Is great"

             ? will reuslt with the Memo1 containing : DataEase is great


             ? will result with Memo1 containing> is great


             ? will result with Memo1 containing: is great DataEase


Notice that "MyName" has no space, because the trailing space in "My " was truncated. Whereas the words "Name is" are correctly spaced, because the string " is" had a leading space.

The Jointext function is retained, and can still be used.
Complimentary Functions

MemoCopy() - same function but copies, inserts or overwrite a Memo with a normal DataEase field or constant.
WriteToFile() - Function that will perform the same functionality, but write to a file instead of a Memo.
Chr() - Function that returns the ASCII character for a number, you will need this to insert " or NewLine into a Memo.
MemoWriteToFile() - Same as WriteToFile() but writes, inserts or appends a memo to a file.
MemoReadFromFile() - Reads a file into a memo.


See Also

On the forum about MemoMemoCopy

MemoMemoCopy Changed ?

Hallo Dataease Forum !I have a new Special Kind if Problems.If i Use MemoMemoCopy an i want to work with the Switch "0" or with "1" nothing rigth happend.I use RefreshScreen() after this functions.But if i use the Switch "4...

Product: Dataease [{8}]FIVE. Written by 07/05/15 at 12:10:59

Re:MemoMemoCopy Changed ? Has been cleared!

Hallo Dataease Forum,i think this subjekt has been cleared !I found out that the Documentation (PDF File with the Functions help) is not correct !If i compare it with the Documentation at the Blog on this Webpage i can see that no...

Product: Dataease [{8}]FIVE. Written by 08/05/15 at 20:10:43

Re:Re:MemoMemoCopy Changed ? Has been cleared!

Hello!Thanks for this.We are working with a revision of the documentation so hopefully these discrepancies will soon be removed....

Product: Dataease [{8}]FIVE. Written by DataEase 11/05/15 at 12:39:50

On the blog about MemoMemoCopy

New Function in 8 - MemoMemoCopy() - Copy, Insert or Append a Memo to another (Ver.

This little function is together with MemoReplace() almost the centrepiece of the Memo Class.As you might have already discovered, normal DataEase functions like Jointext, Firstc, MidC or even Concat, doesn't go very far when it comes to Memo f...

Product: Dataease [{8}]FIVE. Written by DataEase 29/09/11 at 12:32:32