17.16.5.36 MERGEREC

Description: When an application uses the contents of this document to perform a mail merge, this field is an instruction that the field result display the number of the corresponding data record in the merged document. The number reflects the sequential order of the data records that were selected and possibly sorted for merging with the active main document. It does not indicate the actual order of the records as they occur in the physical data source. [Note: A personnel database might contain thousands of records. However, to send a form letter to employees who’ve reached their five-year anniversary with your company, you’d select as your data source only the records of those five-year employees, a much smaller set of records. To print a physical record number, you must include a record number field in the data source and insert the corresponding merge field in the main document. end note]

Field Value: The literal text «MERGEREC» unless a mail merge is being performed, in which case, the number of the data record being merged.

Switches: None.

[Example: The following example uses a MERGEREC field inside a formula to create unique invoice numbers. When the main document is merged with the data source, the number resulting from the MERGEREC field is added to the numbers representing the date and time the invoices are printed.

Invoice Number: = { PRINTDATE

The result might be:

Invoice Number for record 12, printed on Feb. 13, 2003 at 9:46:
  02132003094612

end example]

Syntax:

Last updated on