# MEMO

Syntax:

Then: MEMO xx delete

Then: MEMO xx clear

Then: MEMO xx edit [(row, col, height, width [,startrow, startcol] )] [WRAP | NOWRAP] [READONLY] [TITLE]

Then: MEMO xx export filename [APPEND]

Then: MEMO xx import filename

Then: MEMO xx show [(row, col, height, width [, startrow, startcol ] ) ] [WRAP | NOWRAP]

If: MEMO

If: NOT MEMO

Version Ref: 5.0

Description:

Used to manage Binary Large Objects (BLOBS) which are plain-text. The items are stored within a filePro record as a variable length field based on the size of the object. The objects are retrieved with an internal filePro editor or by using and external program to display, edit, print, or to otherwise manipulate them.

Note:

Length and type must be defined as (16,MEMO).

Memo Printing

Refer to "Embdedding Objects " for memo printing.

MEMO commands:

Then: MEMO xx IMPORT filename

Imports contents of specified "filename" into MEMO field xx.

Then: MEMO xx EXPORT filename [APPEND]

Exports MEMO field xx to the specified filename.

APPEND is an optional parameter that allows you to append the exported memo to a file. This option was added in version 5.6

Then: MEMO xx DELETE

Deletes the specified MEMO field xx.

Then: MEMO xx SHOW [NOWRAP]

Shows the specified MEMO field xx.

NOWRAP is an optional parameter added in version 5.6 to prevent text from wrapping.

Then: MEMO xx CLEAR

Clears the specified MEMO field xx after a SHOW xx MEMO.

Then: MEMO field EDIT [(row, col, height, width [,startrow, startcol ] ) ] [WRAP|NOWRAP] [READONLY]

Brings up the internal filePro memo editor. All parameters are optional. Blank row/col means center vertical/horizontal. Blank startrow/startcol means position at start of memo. The internal filePro editor will word wrap as the default. Word wrap can be turned with the optional NOWRAP parameter. READONLY will prevent the memo from being updated.

Then: MEMO field EDIT (row,col) TITLE "Window title text"

Then: MEMO field SHOW (row,col) TITLE "Window title text"

Adds a title to the memo window.

Note: Only fileProGI will display this title in version 5.0.6.

Examples:

@keym If:

Then: MEMO 2 EDIT

The above example will bring up the internal filePro memo editor for field 2 in a centered window when the key "m" is pressed at "Enter Selection". Since no parameters are specified, a default window size of 10 rows by 35 columns wide is used.

@wlfmf if: mf gt "" 'a memo flag field is greater than a blank

then: MEMO 2 EDIT (" "," ","15","60","2 ","1")

In the above example, if dummy field "mf" is not equal to a blank you will get a memo editor window that is centered. The height is "15" rows and width is "60" columns. When the user enters the memo field, they will be placed in row 2, column 1 as specified by the last two parameters.

If: @sn eq "ray" 'if the current screen name is ray

Then: MEMO 10 EDIT ("10","10","10","40") NOWRAP

If you are on screen name "ray", the filePro memo editor opens up a window with an upper left hand corner at 10,10 and places the current contents of memo (field 10) in it for editing. The window size is 10 rows by 40 columns. Notice that the starting row and column values are not specified in this example. If these values are not specified the starting row and column defaults to "row 1", "column 1". Also, word wrap is turned off with the optional parameter "NOWRAP". If this paremter is not used, the internal memo editor defaults to word wrapping e.g. "WRAP".

If: @sn eq "ray"

Then: MEMO 10 SHOW

If you are on screen name "ray", the filePro memo editor opens up a window with an upper left hand corner at 10,10 and places the current contents of memo (field 10) in it for display only. The window size is 10 rows by 40 columns. Notice that the starting row and column values are not specified in this example. If these values are not specified the starting row and column defaults to "row 1", "column 1".

If:

Then: MEMO nn CLEAR

Clears the memo field from the screen after a MEMO nn SHOW.

MEMO Condition

If: MEMO

If: NOT MEMO

Determines if the most recent MEMO command succeeded or not.

Note:

Length and type must be defined as (16,MEMO). Currently, MEMO and BLOB are aliases, so "if: NOT BLOB" command will return the same result as "if: NOT MEMO". (MEMO fields are simplya plain-text BLOB fields.)

If: MEMO xx CO "mytext"

Determine if MEMO field xx contains a string "mytext".

Extended Functions and Help for "Inquire/Update/Add"

The internal filePro editor has extended functions and help. When a memo field is displayed in "Inquire, Update, Add", you will see "Press [F8] for extended functions, [F10] for help". When pressing [F8], a screen is displayed as shown in figure 1.

Figure 1 - Memo Editor Extended Functions

Although the extended functions are rather self-explanatory, it is important to note that the "Mark text" option allows you to select blocks of text that can be pasted to other records.

Mark Text - Allows you to use the cursor keys, PgUp, and PgDn to select text After selecting this option, another set of extended functions (as shown in figure 2) are presented when pressing the [F8] key.

Figure 2 - Selected text extended functions.

This menu allows you to cut, copy, or delete the text you have selected. When selecting these options, the selected text is maintained in filePro's clipboard for pasting into the current record or another record. When pressing any of these extended function keys, you are returned to the memo editor screen and your selected text is stored in the clipboard.

You can press [F10] for help at any point while editing your memo fields. Figure 3 depicts the typical help for the "Memo Editor" functions.

Figure 3 - Memo Editor Help

Note that the standard filePro keys also apply for the filePro "Memo Editor" functions. You can use [Alt] [F9] (DOS/Windows) or [Ctrl] [Z] (*NIX) to toggle INSERT/OVERTYPE mode while editing memo fields.

When pressing [F10] for help in the extended functions, a screen similar to figure 4 is displayed.

Figure 4 - Memo Editor Extended Functions Help