|Contents:||Main||Chapter||See Also:||Getting Started Manual||Programmer Manual|
With the Define Foreign File Format option, you determined the data format for your export, and made sure there was a corresponding FOREIGN FORMAT file entry. The next step is to choose what file and field data to export. Do this using the Select Fields for Export Option; this creates a SELECTED EXPORT FIELDS template.
The process of creating a SELECTED EXPORT FIELDS template is very similar to the way you choose fields for printing with the Print File Entries option.
NOTE: For details on selecting fields, please refer to the "Choosing Print Fields" topic in the "Print: How to Print Reports from Files" chapter of the "VA FileMan Getting Started Manual."
First, you must identify the file from which you are exporting data. This is the primary file. Then you choose from which fields to export data.
In addition to fields from that file and its Multiples, you can export data from other files by using the extended pointer syntax (see the "Relational Navigation" chapter in this manual). Also, you can put other computed expressions at the "EXPORT FIELD:" prompt to make use of VA FileMan functions or M code.
There are several kinds of specifications that are valid at the "PRINT FIELD:" prompt that are not allowed at the "EXPORT FIELD:" prompt. They are:
After you enter a set of field specifications, you are immediately prompted for a template in which to store the selected fields. You must store your field specifications in a template to proceed with the next step in the data export. After you specify a template name for the SELECTED EXPORT FIELDS template, you have completed this step.
The following is an example of the "EXPORT FIELD:" dialogue. The example uses the sample PATIENT file. Several unacceptable responses are shown; the error messages are the ones you would receive to these responses:
Select VA FileMan OPTION: OTHER OPTIONS Select OTHER OPTION: DATA EXPORT TO FOREIGN FORMAT Select DATA EXPORT TO FOREIGN FORMAT OPTION: SELECT FIELDS FOR EXPORT OUTPUT FROM WHAT FILE: PATIENT FIRST EXPORT FIELD: NAME;S SORRY. You cannot add ;S to the export field specifications. FIRST EXPORT FIELD: NAME THEN EXPORT FIELD: INTERNAL(SEX) THEN EXPORT FIELD: RELIGION: SORRY. You cannot jump to another file when selecting fields for export. THEN EXPORT FIELD: $E(RELIGION:CLASSIFICATION,1,5) THEN EXPORT FIELD: DIAGNOSIS (multiple) THEN EXPORT DIAGNOSIS SUB-FIELD: DIAGNOSIS THEN EXPORT DIAGNOSIS SUB-FIELD: HISTORY (word-processing) SORRY. You cannot choose a word processing field for export. THEN EXPORT DIAGNOSIS SUB-FIELD: AGE AT ONSET THEN EXPORT DIAGNOSIS SUB-FIELD: THEN EXPORT FIELD: STORE EXPORT LOGIC IN TEMPLATE: PATIENT TEST Are you adding 'PATIENT TEST' as a new PRINT TEMPLATE? No// Y (Yes) Select DATA EXPORT TO FOREIGN FORMAT OPTION:
SELECTED EXPORT FIELDS templates are sometimes referred to as PRINT templates in the user dialogue. This is because they are stored in the PRINT TEMPLATE file (#.4).
NOTE: Even though you cannot "jump" to the RELIGION file (#13) using the RELIGION field, which is a pointer to the RELIGION file, you can retrieve data from that file by using extended pointer syntax.
You can edit a SELECTED EXPORT FIELDS template. The editing must occur in the Export Data option, not in the standard Print File Entries option. To edit one, enter the template name at the "FIRST EXPORT FIELD:" prompt preceded by a left bracket ("[").
If an EXPORT template (see the Step 3) has been created based on the SELECTED EXPORT FIELDS template that you edit, the SELECTED EXPORT FIELDS template will not be updated to reflect the changes. You must create a new SELECTED EXPORT FIELDS template to make use of the changes.
Reviewed/Updated: March 4, 2007