LOAD SET

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


LOAD SET ({table; }set; document)

ParameterTypeDescription
tableTableTable to which the set belongs, or
Default table, if omitted
setStringName of the set to be created in memory
documentStringDocument holding the set

Description

LOAD SET loads a set from document that was saved with the SAVE SET command.

The set that is stored in document must be from table. The set created in memory is overwritten if it already exists.

The document parameter is the name of the disk document containing the set. The document need not have the same name as the set. If you supply an empty string for document, an Open File dialog box appears so that the user can choose the set to load.

Remember that a set is a representation of a selection of records at the moment that the set is created. If the records represented by the set change, the set may no longer be accurate. Therefore, a set loaded from disk should represent a group of records that does not change frequently. A number of things can make a set invalid: modifying a record of the set, deleting a record of the set, or changing the criteria that determined a set.

Example

The following example uses LOAD SET to load a set of the Acme locations in New York:

    
   LOAD SET ([Companies]; "NY Acme"; "NYAcmeSt")   ` Load the set into memory
   USE SET ("NY Acme")   ` Change current selection to NY Acme 
   CLEAR SET ("NY Acme")   ` Clear the set from memory

System Variables or Sets

If the user clicks Cancel in the Open File dialog box, or there is an error during the load operation, the OK system variable is set to 0. Otherwise, it is set to 1.

See Also

SAVE SET.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next