EXPORT
This action exports existing instances of the specified business object into a comma delimited text file (CSV file).
Syntax
EXPORT
(Id() | StringLiteral()) TO
ArithmeticOperation() [ FOR UPDATE
] [ EXCLUDE RELATIONSHIPS
] [ EXCLUDE BINARY
] [ USING
ArithmeticExpression () ] [ APPEND
]
[ ENCODING
ArithmeticExpression ()] [ USE ATTRIBUTE LABELS
] [ SKIP COLUMN DESCRIPTIONS
] [ EXPORT ATTRIBUTE FORMAT
]
where Id() is the identifier of the business object to be exported, StringLiteral() is the name of the query to be exported and the ArithmeticOperation() is the expression identifying the name of the export file. If the file doesn’t exist it will be created. The result of the arithmetic operation must be a string.
Example
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv'
If the name of the business object is used, the instances available in the current context will be exported. If the name of the query is used Aware IM will run the query and export the results. If the query has attributes to display defined, only those attributes will be exported. Query names have to be enclosed in apostrophe. User defined queries are also supported.
There are several options that can be used with the action:
- If the
FOR UPDATE
keyword is specified the ID attributes of the business objects will be written into the export file. If such a file is later imported into the system, the system will look for the objects with the specified ID’s and modify them rather than insert the new ones. If theFOR UPDATE
keyword is not specified the ID attributes of the objects will not be written into the export file and if such a file is later imported into the system, each record in the file will create the new instance of the business object. For example:
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' FOR UPDATE
- If
EXCLUDE RELATIONSHIPS
keyword is specified any relationships that the exported object has with other objects will not be written into the output file. By default all relationships are exported. For example:
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' EXCLUDE RELATIONSHIPS
- If
EXCLUDE BINARY
keyword is specified any binary attributes that the exported object has (such as Pictures and Documents) will not be written into the output file. By default all binary attributes are exported. For example:
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' EXCLUDE BINARY
- The
USING
expression allows you to use an existing export template. For example:
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' USING 'Account Template'
- The
APPEND
keyword allows you to append to an existing file rather than create a new one. For example:
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' APPEND
- The
ENCODING
keyword allows you to specify encoding of the exported file, for example:
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' ENCODING 'UTF-8'
The default encoding is UTF-8.
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' USE ATTRIBUTE LABELS
The header of the file containing column descriptions will be exported and instead of attribute names labels of the attributes will be exported
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' SKIP COLUMN DESCRIPTIONS
The header of the file containing column descriptions will not be exported
EXPORT PersonalSavingAccount TO 'c:/mydocuments/psa.csv' EXPORT ATTRIBUTE FORMAT
The header of the file containing column descriptions will be exported and the header of a Date, Timestamp, Duration and Number attributes will have the appropriate format included in the description of the column.
See also the “Export and Import” section.