KNOWLEDGE BASE ARTICLE

Umango Merge Fields and Meta Data

Note: Only available in Umango Convert versions after and including 5.4.3 and Umango Extract after and including 5.8.0

Meta data can be merged into various job settings to enable dynamic naming and referencing of job exports. There are various types of meta data that can be used and there are various helpers to lookup and/or manipulate this data.

To reference a data field, encapsulate the name of the field within <<>> eg. <<IndexFieldName>>. A helper list is displayed in job properties that support using meta data variables (as seen below). To use the helper list, move the cursor to the location in the field that the data is required and begin typying to see a helper list of options to select from.

Merge field helper list

To jump to sections specific to your requirements, select from the areas below:

  • LDAP - Retrieve property values from an LDAP/Active Directory source
  • DateTime - Format date and time values in whatever structure you require
  • System variables - Static values available while the file is being processed
  • XML - Read data from an XML file alongside the source file
  • Replace - Search and replace values with advanced serach (including support for regex)
  • Regex - Apply Regex (regular expression) filters to text/data. Search and extract data using regular expression rules

LDAP Properties

Active Directory values can be used by referencing LDAP property names.

An optional second parameter providing a user name can be added. If this parameter is omited then the default user is assumed (see system variabled section below).

Some example LDAP lookups are:

  • LDAP(homeDirectory) - The home directory of the batch creator
  • LDAP(mail) - The email address of the batch creator
  • LDAP(givenName) - The first name of the batch creator
  • LDAP(homeDirectory,john_doe) - The home directory of the user john_doe

A full listing of LDAP properties can be found here. Most of the properties relating to users can be used.

Date and Time Properties

Date and time related values (based on time the document is processed) can be used as shown in the examples below:

  • DateTime(dddd) - The full name of the day of the week
  • DateTime(ddd) - The abbreviated name of the day of the week eg. Mon Tue etc
  • DateTime(HH) - The hour, using a 24-hour clock from 00 to 23
  • DateTime(MMMM) - The full name of the month

A full listing of the date and time segments that can be used can be found here.

System Variables

Various system values are available and are included in the merge helper list. This includes the user name, source file name, file path etc.

When using Umango Convert (not supported in Umango Extract) to scan from a supported MFP device, the following merge field values are also available:

  • UserName - The authenticated user name (if the user was authenticated)
  • DeviceIp - The IP4 address of the device that scanned the document
  • DeviceName - The device name of the device that scanned the document

NOTE: When the user name is referenced (eg <<UserName>>) and a document has been scanned from an MFD using the Umango embedded application, Umango will use the authenticated user name (if the user was authenticated). If no user details are available, Umango will retrieve the file owner name from the source file.

When the file source is an email attachment, the following merge field values are also available:

  • EmailSenderUserName - The user name portion of the email address (the portion before the '@')
  • EmailSenderDomain - The domain portion of the email address (the portion following the '@')
  • EmailSenderAddress - The email address of the sender
  • EmailSenderName - The full name of the sender of the email
  • EmailDateTime - The GMT time the email was sent
  • EmailSubject - The subject text of the email
  • EmailBody - The body text of the email (the text version only, not the html body)
  • EmailToAddresses - A comma separated list of all the recipient email addresses
  • EmailCCAddresses - A comma separated list of all the CC'd email addresses

Imported Data Values from XML files

Meta data can be provided within an xml file alongside the source file being processed. The file should be named exactly the same name as the source file with an .xml file extension.

Merge xml file alongside source pdf document

There are 2 ways to read xml data. The xml file can be formated to include a node called "indexes" and structured as below...

Merge field xml example

In the example provided above, there are two data fields that can be referenced as <<Invoice_No>> and <<Company_Name>>

Alternatively, any XML element or attribute can be referenced using the XML(xPath/to/element) structure. So assuming the xml file seen below...

xml file example

We can use the following options to read a data value:

  • XML(scan/user/name) - Reads the content of the element "name" and will return "joe_downey"
  • XML(scan/deviceName/A:brand) - Reads the value of the attribute "brand" and will return "Sharp"
  • XML(scan/files/file[2]) - Reads the content of the second occurance of the element named "file" at "scan/files/file" and will return "account_3009363_2.jpg"

So we could do something like this:

MyFile-<<XML(scan/deviceName/A:brand)>>-<<XML(scan/user/name)>>-<<Replace([<<XML(scan/files/file[2])>>],[.jpg],[])>>.pdf

Which would result in the file name:

MyFile-Sharp-joe_downey-account_3009363_2.pdf

The Replace Function

The Replace keyword can be used to switch out text within data values. The syntax is Replace([DataToSearch],[SearchValue],[ReplacmentText]). Where the parameters are:

  • DataToSearch - The data that is being manipulated
  • SearchValue - The text (a regular expression) we are searching for
  • ReplacmentText - The text we are replacing matching instances with

So, assuming we are referencing the XML file displayed above, the following

<<Replace([<<XML(scan/user/name)>>],[joe],[bob])>>

Would result in a value of bob_downey

Changing Case

The UCase and LCase keywords can be used to change the text within data values to be conformant. The syntax is UCase(Text) where the 'Text' will be changed to upper case characters.

The Regex Function

The Regex keyword can be used to extract only a portion of the text within data values based on a regular expression. The syntax is Regex([SearchText],[Expression]). Where the parameters are:

  • SearchText - The data that is being searched
  • Expression - A regular expression pattern representing the text to be extracted

An example of the use of the Regex keyword might be:

MyFile-<<Regex([<<XML(scan/files/file[2])>>],[\d{7}])>>.pdf

Which would result in the file name:

MyFile-3009363.pdf

Link to this article http://umango.com/KB?article=80