Export fields

Command groupFlag affectedReversibleExecute on clientPlatform(s)
Importing and ExportingYESNONOAll

Syntax

Export fields
 
index-name
 
 ([
Indirect
][,
Use search
][,
Disable messages
])
 {
list-of-field-names 
(Name1,Name2,...)
}

Options

IndirectIf specified,the command uses the contents of the first field as the list of fields
Use searchIf specified,the command uses the current search to select data
Disable messagesIf specified,the command does not open messages requiring a user response,and instead it writes a limited amount of information to the trace log

Description

Export fields exports the data for the list of fields to the current export file. It provides runtime access to the functionality of the export data dialog in the IDE. The command sets the main file for the export to the file corresponding to the first field in the list. The index-name is the optional name of the indexed field which determines the order of the exported data.

Example

# export to a file called myExport.txt in the root of your omnis tree

Calculate
 
lExportPath
 as 
con
(
sys
(115),
'myExport.txt'
)

Set print or export file name
 
[
lExportPath
]

Prepare for export to file
 
Delimited (commas)

Export fields
 
fCustomers
.
CustomerID
 {
fCustomers
.
Surname
,
fCustomers
.
FirstName
}

End export
Close print or export file