Skip to main content
Version: Next

LOAD VARIABLES

LOAD VARIABLES ( document ; variable {; variable2 ; ... ; variableN} )

ParameterTypeDescription
documentTextDocument containing 4D variables
variableVariableVariable(s) to receive the value(s)

Description

The LOAD VARIABLES command loads one or more variables from the document specified by document. The document must have been created using the SAVE VARIABLES command.

The variables variable, variable2...variableN are created; if they already exist, they are overwritten.

If you supply an empty string for document, the standard Open File dialog box appears, so the user can choose the document to open. If a document is chosen, the 4D system variable Document is set to the name of the document.

In compiled databases, each variable must be of the same type as those loaded from disk.

WARNING: This command does not support array variables. Use the new BLOB commands instead.

Example

The following example loads three variables from a document named UserPrefs:

 LOAD VARIABLES("User Prefs";vsName;vlCode;vgIconPicture)

System variables and sets

If the variables are loaded properly, the OK system variable is set to 1; otherwise it is set to 0.

See also

BLOB TO DOCUMENT
BLOB TO VARIABLE
DOCUMENT TO BLOB
RECEIVE VARIABLE
VARIABLE TO BLOB