Using a formula in the primary field
  • 22 Aug 2022
  • 1 Minute to read
  • Dark
    Light

Using a formula in the primary field

  • Dark
    Light

The primary field (the first column in any table) can be configured as a formula, which takes data from other fields in the table to compose a unique name for each record. This can be useful if your table does not lend itself particularly well to a single unique primary field.

Concatenation

You can use a formula with the CONCATENATE() function or the ampersand sign "&" to link together data from other fields and/or static text. Using the ampersand method, you can build a formula that combines the client name, some static description text, and the order number that looks like this:

{Client & ":order #")&{Order no.}

ampersandPrimaryName

Here's the same example, but using the CONCATENATE() function instead. As you can see, the formula outputs the exact same text string, so the method you use is largely up to personal preference:
CONCATENATE({Client},": order #", {Order no.})

concatenatePrimaryName

Autonumbering

Formulas for the primary field can also be combined with the autonumber field type to automatically assign each record a unique number.

For example, the formula below concatenates:

the static text "MYPREFIX"
the variable value ({Autonumber}) which comes from the field named "Autonumber"
the static text "MYSUFFIX" to create unique record names in the primary field.
Here is is all together:

CONCATENATE("MYPREFIX", {Autonumber}, "MYSUFFIX")

prefixSuffixAutonumber


Was this article helpful?