Macros

Macros are used to dynamically change a setting such as an export file name or a batch name based on data such as current time or the value of a captured data field.

Input Client

Macros can be used to dynamically configure batch name and batch description. The following macros are available:

  • $(CurrentDate-yy-MM-dd) - The current date in the specified format.
  • $(CurrentDateTime-yy-MM-dd-hh-mm-ss) - The current date and time in the specified format.
  • $(CurrentTime-hh-mm-ss) - The current time in the specified format.
  • $(DocDir) - The directory which the document has been loaded from.
  • $(DocDirName) - The name of the folder where the document was loaded from.
  • $(DocFileName) - The file name of the first page in the document without the extension.
  • $(DocFullPath) - Not used.
  • $(Env-USERNAME) - The value of the OS username environment variable. Works with any environment variable.
  • $(Sequence) - Sequential number which is unique for the current user and incremented on each macro evaluation.
  • $(UserName) - The name of the user that is currently logged on the application server.

Verify and Export Clients

Macros can be used to dynamically configure:

Tip

Example of a formula with a macro: EVALEXPR(“$(BatchDesc)”). This formula will display the batch description into the applied field.


  • $(Vendor) - the value of the field FT_VENDOR_NAME
  • $(IssueDate-yyyy-MM-dd) - the date from the field FT_ISSUE_DATE in the described format
  • $(IssueDate-yyyy) - the date from the field FT_ISSUE_DATE in the described format
  • $(IssueDate-MM) - the date from the field FT_ISSUE_DATE in the described format
  • $(FormTemplate) - the from template name
  • $(Field-FT_FIELD_ID) - the text from the entered field id
  • $(ExportFolder-PDF) - the export path for PDF,CSV,XML,TIFF
  • $(Env-USERNAME) - the user of the PC
  • $(BatchDesc) - the batch description
  • $(BatchId) - the batch ID
  • $(BatchLocale) - the batch locale
  • $(BatchName) - the batch name
  • $(BatchType) - the batch type
  • $(DocUuid) - the GUID of the document from the server
  • $(DocType) - the document type
  • $(DocNum) - the date from field FT_INVOICE_NUMBER
  • $(DocId) - the ID of the document for the current session
  • $(DocFullPath) - the path to the document including the document name
  • $(DocFileName) - the file name of the first page of a document
  • $(DocDir) - the path to the document
  • $(CurrentTime-hh-mm-ss) - current time in the described format
  • $(CurrentDateTime-yyyy-MM-dd hh_mm_ss) - current time in the described format
  • $(CurrentDate-yyyy-MM-dd) - current time in the described format
  • $(CurrentDate-yyyy) - current time in the described format
  • $(FileModified-yyyy-MM-dd hh:mm:ss) - current date and time in the described format
  • $(LoadTimestamp-yyyy-MM-dd hh:mm:ss) - current date and time in the described format
  • $(CurrentDateTime-yyyy-MM-dd hh_mm_ss) - current date and time in the described format
  • $(ExportTimestamp-yyyy-MM-dd hh:mm:ss) - current date and time in the described format
  • $(FileCreated-yyyy-MM-dd hh:mm:ss) - current date and time in the described format

Only in a Formula

  • $(PreprocessTimestamp-yyyy-MM-dd hh:mm:ss) - current date and time in the described format when formula is evaluated for the first time
  • $(ProcessTimestamp-yyyy-MM-dd hh:mm:ss) - current date and time in the described format when formula is evaluated for the first time

Only in a Path Expression

  • $(PreprocessTimestamp-yyyy-MM-dd hh:mm:ss) - current date and time in the described format
  • $(ProcessTimestamp-yyyy-MM-dd hh:mm:ss) - current date and time in the described format

Example

$(CurrentDate-yyyy-MM-dd)\$(Field-FT_INVOICE_NUM)-$(Field-FT_TOTAL) will result in export files grouped in folders by date and the file names will contain the invoice number, followed by a dash, followed by the invoice amount.