Page tree

Add States and Provinces to Print Templates

Adding state or province names to print templates is relatively simple, but if you want to spell the names out, you also need to pair them with the appropriate article ("a" or "an"). The simplest way to accomplish this is with a background table that contains each state or province, its abbreviation, and the appropriate article.

Create a Table

First, set up the background table with the data for each state or province.

  1. Create a background table to hold the list of states and provinces.
  2. Add four fields to the table:
    • State Name or Province Name: Enter the full name of the state or province.
    • Abbreviation: Enter the commonly accepted abbreviation for the full name, usually those used in mailing addresses.
    • Article: Select "a" or "an" to match the full name.
    • Title: Select state, commonwealth, province, or territory.

You can populate the table more easily by importing States.xlsx to the table. This file contains the US states, Washington DC, and the Canadian provinces. For more guidance, see Importing Record Data.

Set Up Automation

To utilize your new background table, you need to establish a link between that table and the relevant process table.

  1. Go to Setup [Table] for the process table. For example, go to Setup Contracts.
  2. On the Fields tab, select New > Link to Selected Fields from Other Table.
  3. Under Select Table, select your background table.
  4. Select the fields holding the name, abbreviation, article, and title of the state or province.
  5. Set any other necessary options and save the new field.
  6. Go to the Rules tab.
  7. Edit the rule that runs when new records are created. If there isn't one, create one.
  8. Go to the Action tab and create an If-Then-Else action:
    1. Set up an if condition that determines whether the company country is the US or Canada. If your background table includes states or provinces for other countries, include them in the condition as well.
    2. If the condition is true, update the linked field set to match the state or province selected.

You might want to make similar changes to the Edit rule for the process table, so that the linked set is updated if the address changes to a different location.

Set Up the Print Template

When your system is automatically pulling the correct state or province name and article into the process table, you can add any of these pieces to a print template. That means in addition to pulling the name of the state or province, you can also pull in the assigned "a" or "an" article, instead of typing "a" or "an" directly in the template. To do so, simply insert the article field and then the name field into the print template.

This template inserts the article ($state_article) before the name ($state_name), so "a" or "an" is inserted correctly every time. Consider two examples of how the highlighted section would be rendered.


$state_article$state_nameFinal Text of Highlighted Phrase
CaliforniaaCalifornia"a California company"
OregonanOregon"an Oregon company"

Because the template pulls the content from the background table, for a California-based company it renders "a California company," while one in Oregon results in "an Oregon company." You can also use the background table to construct wording like "a company in the commonwealth of Virginia" or "a limited liability corporation in the territory of Nunavut."

For more information about working with formulas and field names, see Creating Print Templates.