Tech Tip: Quick Fields 8: Customizing Tokens

A token is a placeholder value that is automatically replaced with actual values when a document is scanned or stored in a Laserfiche repository. You can use tokens to name documents, populate field data, or define a document’s location. Some Quick Fields 8 processes return data that will replace tokens with values, such as the Lookup process, which retrieves information from a database.

May 27th, 2009 Comment on this article

Since this tech tip is a preview of unreleased software, the details and appearances of certain elements may change between now and the final release.

A token is a placeholder value that is automatically replaced with actual values when a document is scanned or stored in a Laserfiche repository. You can use tokens to name documents, populate field data, or define a document’s location. Some Quick Fields 8 processes return data that will replace tokens with values, such as the Lookup process, which retrieves information from a database.

In this tech tip, we will explore some of the ways you can customize the value that is returned.

Inline Regular Expressions

You can customize a token by applying a regular expression via the following syntax: %(TokenName##). Inline regular expressions can be applied wherever you want to use a token, without the need to add a Pattern Matching process to your session.

For example, Sarah needs to retrieve a name from a database and use it to populate each document’s First Name and Last Name fields. She can automate this procedure using a Lookup process. Since first names and last names are stored in the same database cell, the Lookup process will return FirstName LastName via a single token. To split the names in order to populate her First Name and Last Name fields separately, Sarah can use the following inline regular expressions.

Field Regular Expression Example
First Name Field %(TokenName#<.+,s(.+)>#) Would convert Doe, John to John and Smith, Mary-Ann to Mary-Ann.
Last Name Field %(TokenName#< (.+),s.+ >#) Would convert Doe, John to John and Smith, Mary-Ann to Mary-Ann.
  • Note: The Pattern Matching add-on is required to use inline regular expressions.

Token Date Formatting

If a token contains a date, you can use the following syntax to change the date format: %([TokenName],”NewFormat”).

For example, Sam’s session contains an OmniPage Zone OCR process that returns a date in the following format: September 15, 1981. When this token is used to populate a Lookup process’s search value, Sam needs to use the following format: 09-15-1981. Sam should use the following syntax: %([TokenName],” MM-DD-YYYY”).

  • Note: For Date and Date/Time fields, the date value will be will be automatically reformatted to match the system’s date format.

Token Editor

When building regular expressions, you can use the Token Editor.

042709tt_tokeneditor

To open this tool:

  1. Add a token to a field or text box.
  2. Right-click the token and select Token Editor.

Tags:

Comment on this article