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
For example: Perhaps you'd like a table with individual records for each of the interviews in a recruitment process. In this case, you could use a formula with the concatenate function (either CONCATENATE() or the ampersand, "&") to link together data from other fields and/or static text. The primary field in this example automatically generates a unique name for each record based on the values in the "Applicant," "Date," and "Interview" fields.
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 uses ampersands to concatenate the static text "MYPREFIX" and "MYSUFFIX" with the variable value from the column "AutoNumber" to create unique record names.
"MYPREFIX" & {AutoNumber} & "MYSUFFIX"
Example: Writing a formula for the primary field combining autonumbering with concatenating text values
Let's suppose that you're a nefarious supervillain, and you'd like to have a table tracking your showdowns with various superheroes, where each record is a separate encounter with a superhero.
You'd like for each record to state the number of the encounter, the name of your opponent, and the location at which you fought, in the form of "Encounter [Number]: Vs. [Opponent] at [Location]."
Let's start by making columns for "Opponent" and "Location," and another column, "Encounter #," which we will configure as an autonumber type field.
Then, use the dropdown in the primary field (here renamed to "Event") to configure the column as a formula type field. Put the text that you'd like to remain static inside quotation marks. Concatenate these static text values with the variable field values by using "&". To select fields, you can either type in the name of the field, or click on the desired field in the "Insert a column or function" dropdown. Notice that if a field name is multiple words, its name must be enclosed in curly brackets (e.g., {Encounter #}).
Putting in the formula
"Encounter " & {Encounter #} & ": vs. " & Opponent & " at " & Location
will return these values as the record names:
Notice that extra spaces have been put inside the quotation marks for the static text values so that the record names appear properly.
If you add more values or change the values of the columns, the primary field will automatically update to reflect these changes.