DELETE command
Deletes an Analytics project item, a field from a table layout, a variable, one or more table history entries, a relation between tables, or a file in a Windows folder. Also removes a column from a view.
Syntax
Purpose |
Syntax |
---|---|
To delete an Analytics project item |
DELETE item_type item_name <OK> |
To delete a field from a table layout |
DELETE field_name <OK>
|
To remove a column from a view |
DELETE COLUMN view_name field_name <ALL> <OK> |
To delete a variable or all variables |
DELETE {variable_name|ALL} <OK>
|
To delete the history for the current Analytics table |
DELETE HISTORY <retain_history_entries> <OK>
|
To delete a relation between two tables |
DELETE RELATION <child_table_name|relation_name> <OK> |
To delete a file |
DELETE file_name <OK>
|
To delete all record notes, and the auto-generated RecordNote field, from the open table |
DELETE NOTES <OK> |
Parameters
Name | Description |
---|---|
item_type item_name |
The type and name of the item to delete. Specify one of the following item types:
|
field_name ALL |
Delete a fieldThe name of the field to delete from the current Analytics table layout. You can delete a field from a table layout even if the field is included in the current view. Note You cannot delete a field referenced by a computed field unless you first delete the computed field. Remove a columnThe name of the column to remove from the specified view. Note Use the physical field name, not the column display name.
|
view_name | The name of the view to remove a column from. |
variable_name | ALL |
The name of the variable to delete. Use ALL to delete all variables. If you specify ALL, all occurrences of the following types of the variables are deleted from the project:
Note You cannot delete a variable referenced by a computed field unless you first delete the computed field. |
HISTORY retain_history_entries |
Deletes all table history entries except for the number of most recent entries specified by retain_history_entries. Omit retain_history_entries to delete all entries. |
RELATION child_table_name | relation_name |
Deletes any relation that has no dependent relations and no related fields referenced in either the active view or in an active computed field. Use the options to specify which relation to delete:
If you do not use either option, the last relation that was defined gets deleted. |
file_name |
The name of a physical file to delete. You can specify an absolute or relative path to a file you want to delete. If the path has spaces, enclose it in double quotation marks. |
OK optional |
Deletes items without presenting a confirmation dialog box. |
Examples
Deleting a date field
You delete the Date field from the table layout associated with the Ar table:
OPEN Ar DELETE Date
Deleting multiple columns from a view
You delete two columns from the AR_Report view associated with the Ar table. You specify OK for both DELETE commands so that no confirmation prompt is displayed when the script runs:
OPEN Ar DELETE COLUMN AR_Report Date OK DELETE COLUMN AR_Report Invoice_Date OK