On this Page

    _auto (Automatic Field Values)

    (Merge only)

    The _auto object allows access to the set of automatic field values for Fields. These values can also be used to embed data directly into text Labels. See the Auto/Embedded Fields section.

    Description

    The _auto object is a pre-defined JavaScript object which has several pre-defined properties that you can access (read-only). These property names are out-of-character in that they are case insensitive. But don't try that anywhere else. Note also the aberration in that they do not start with an underscore. This is all in aid of compatibility with their use as embedded and automatic fields. Many of these values can also be accessed using other similar functions within DocOrigin.

    Properties

    _auto.dataFileThe full path and filename of the current data file.
    _auto.dataNameThe filename only (no path, no extension) of the current data file.
    _auto.dataNameExtThe filename and extension (when specified) of the current data file.
    _auto.dataPathThe file path of the current data file.
    _auto.dateThe current date, in the format yyyyMMdd.
    _auto.datetimeThe current date and time, in the format yyyyMMddHHmmss.
    _auto.docNumThe current document number being processed. Numbering starts at 1.
    _auto.formFileThe full path and filename of the current form file.
    _auto.formNameThe filename only (no path, no extension) of the current form file.
    _auto.formNameExtThe filename and extension (when specified) of the current form file.
    _auto.formPathThe file path of the current form file.
    _auto.pageCountThe total number of pages within this document.
    _auto.pageNumThe current page number within the document (also _auto.PN), atypically case-insensitive. This is not a property, per se, of the _auto object, but rather a function, despite the lack of (), that reports the page number of the current global object, i.e. the object in which the script is defined. It makes absolutely no sense to use this on the form object itself. The form object has no "current page" context and can report only 0. You would be better off learning to use this._pageNumber which expresses more clearly what you are getting the current page number of. Note that page numbers are not defined until the Pagination Completed event. They are of no use at Data Merged time.
    _auto.timeThe time that Merge began running, as a string in the format HHmmss.