By: Sarah Seene
Technical Writer

If workflows are the engines that drive successful business processes, tokens are the bolts that hold the engine together. Tokens provide up-to-date information every time a workflow runs, including the most recent information from your Laserfiche repositories.

In their most basic form, tokens are placeholders that Laserfiche Workflow replaces with current and relevant information each time a workflow runs. Editing a token can format that information and can even return information about the token value itself.

For example, the %(Date) token returns the current month, day, and year. However, if a workflow requires only the current month, token editing can change the date token to be replaced with only the month. Alternatively, a multi-value token might return a list of people who approved a document, but, if needed, the token can be modified to return the number of people in the list instead.

The following four token editing options can be used individually or in combination:

  • Indexing: Multi-value tokens are comprised of a list of values, and indexing lets you specify which value in the list to display. For example, if a workflow needs to contact the last person who added their name to the “Approvers” field, the corresponding token can be modified so it is only replaced by its last value. Or, as shown in the screenshot below, you could return the second person who signed the document.

1_Apply_Index

  • Formatting: This option allows .NET formatting expressions to be applied to tokens. For example, these expressions can make tokens conform to a specific date format, display a specific number of digits, or reflect the local currency.

2_Apply_Formatting

  • Regular Expressions: Regular expressions identify a pattern and extract information based on that pattern. For example, you can use a regular expression to modify an “Address” token so it will only be replaced by the zip code instead of the entire address.

3_Apply RegEx

  • Functions: Workflow has a wide variety of functions that can do everything from converting a token value to title case to encoding XML in a token value. Many of the functions apply to multi-value tokens, such as finding the largest value in the token, removing duplicates, sorting the values, and summing the values. In the screenshot below, both the “Tot Tile Case” and “Remove Duplicates” functions have been applied to a list of signatures.

4_Apply_Function

To edit a token

  1. In the Workflow Designer, right-click the token you want to edit.
  2. Select Token Editor.
  3. In the Token Editor, select Apply Functions, Apply Index, Apply Formatting, and/or Apply Regular Expression.
  4. Configure each option as desired. More info.
  5. Click OK to apply the edits.

To learn more about tokens, see the Tokens in Workflow white paper on the Laserfiche Support Site.

Some of the products and services listed on the Laserfiche Solution Exchange were not developed by Laserfiche. The recommendations and opinions expressed on the Laserfiche Solution Exchange are those of the person or persons posting the recommendations only, and they do not necessarily represent Laserfiche's opinion or recommendation of the product or service being reviewed. Laserfiche disclaims all liability resulting from your purchase or use of any non-Laserfiche software product or service listed on the site.