Accessing data for a Word template from an adapl
The ADAPL function WordCreateDocument can be used in output format adapls to fill a Word template with data (possibly modified by the adapl) from Collections records. (WordCreatelabels and WordPrintDocument are not supported in Collections.) If you have set up an adapl as a Custom output format, the adapl and the Word template have direct access to field tags and their content from records in the currently open database table, so in field references in Word templates you can directly use the field tag, like <<IN>> to reference the object number of currently processed object records.
However, any different database table that you have opened in the adapl by means of FACS, can only be accessed in a Word template through the full syntax using the FACS name of the relevant database table followed by a plus character and the field tag: <<FACS_database+Field_tag>>
If the WordCreateDocument function is used, no print and output statements may occur in the adapl: the adapl is now only used to prepare and modify record data for output to the Word template.
See also
Output formats in the application setup
ADAPL programming: output formats