Simplicty and flexibility!


Function::Memo

MemoLength
MemoLength(MEMO FIELD)
MemoLength(MyMemo)


To find out the length (number of characters) in a Memo Field.

Can also be used to figure out if a Memo Field is Blank.

Parameters


MEMO FIELD

The memo field that you want to investigate for Length.

Returns/Result


Numerical Value. Length of MEMO FIELD.

Examples


Example 1


MyMemo contains  a Text that is 3250 characters long.

MemoLength(MyMemo)

Returns: 3250.



Example 2

In a Virtual field we find the following formula;

If (MemoLength(MyMemo)>0, MemoCopy(MyMemo,"This field already contains data!".0),MemoCopy("This MemoField was empty!",1))

This formula will result in the text "This field already contains data!" being appended to the MemoField if it already contains data, and "This MemoField was empty!" be inserted into it if it didn't.



Example 3

The following DQL will return all records where the Memo MyMemo has content.

For MyMemoForm with MemoLength(MyMemo)>0 ;

List records

....

Reference

Just a simple little function that might be very nice when you start manipulating your Memos.

Forget all the negative stuff you have heard about Memos. They are the greatest thing happening to DataEase since Subforms.

They had a rough start, but that was simply because they had to work like large text fields. THEY ARE NOT!

They are a storage class for unstructured text!

We now use the form WebFields, Datastorage, export, import, you name it they do it.

So it might be useful to know how much is stored in one..

number MemoLength(Memo) simply returns that as a number. 0 obviously is empty, but so is Blank...

Good luck!

See Also


MemoWordCount
MemoReplace

On the forum about MemoLength

On the blog about MemoLength

New Function in 8 - MemoLength() - Returns the length of a Memo in characters (Ver. 8.0.0.1128)

Just a simple little function that might be very nice when you start manipulating your Memos.Forget all the negative stuff you have heard about Memos. They are the greatest thing happening to DataEase since Subforms.They had a rough star...

Product: Dataease [{8}]FIVE. Written by DataEase 30/08/12 at 08:23:35


dg3_HelpView