You are here: Commands > Save

Save

Use the Save command to save changes to the current (active) project item (table layout, procedure, etc.) from the File menu or from the command line.

You can also use the Save command from the command line to save the contents of a specified column (field) in the current table as a variable array, to save a graph or to store existing field definitions in a workspace.

The Save Field option is intended for storing field values in a variable array. This is particularly useful for use with the LISTFIND() function, for populating values in user dialogs with data from a table, and as an easy and efficient alternative to the use of the RECOFFSET() function if the number of stored values is reasonable.

Tip: If you only want to save a subset of data in a column to a variable array, issue a SET FILTER command first to establish a global filter and then issue the SAVE FIELD command to store only the filtered column values into the variable array.

Note: When saving the contents of a field to a variable array, there is no limit to the size of the array created so be careful, as you may consume an excessive amount of memory storing a very large variable array.

For more information on “Variable Arrays” see Variable Arrays.

For more information on LISTFIND() function see LISTFIND().

For more information on populating dialog boxes created by the Dialog command using variables and variable arrays see Manually Editing Dialog Commands and Variables.

For more information on the RECOFFSET() function see RECOFFSET().

For more information on Workspaces see Workspaces.

Note: Any external field referenced in a workspace must exist and be identically named in all table layouts to which the workspace is applied.

Parameters

The Save command has the following optional parameters:

Field

Indicates that you want to save the contents of the specified field in the open table as a variable array.

Graph

Indicates that you want to save a graph to disk as a bitmap. This can be added to a procedure after a valid command is outputted TO GRAPH, so you can capture the created graph.

Workspace

Indicates that you want to save a workspace file containing the specified fields from the current table layout.

Command Mode Syntax

There are four variations to the Save command syntax:

SAVE

SAVE FIELD field-name <TO> variable-array-name

SAVE GRAPH <TO> file-name

SAVE WORKSPACE workspace‑name workspace‑fields