How to Change or Add a Field Format

:book: This guide explains what field formats are and how to create, edit, and apply them to fields.

In Specify, you can configure something called a field format, which simply means a structured input format assigned to a data entry field. Any text field can be assigned a field format, and this is enforced when data is entered via the forms, WorkBench, Batch Edit, or using the APIs.


Overview

  • Format Templates: Field formats are defined as templates broken into segments (e.g., static text, year, incrementing number).
  • Auto-Numbering: Segments can be configured to auto-increment, ensuring unique values.
  • User Guidance: During data entry, the format provides a visual cue, reducing errors and enforcing uniform structure.
  • Customization: Formats can be customized for any field that requires structured identifiers.
    The Field Format Editor lets you define how values are displayed or auto-numbered for specific table fields by composing a sequence of format parts. Each part controls a segment of the formatted string (year, constants, separators, numerics, etc.).

How Does it Work?

A format is created by defining each segment in the Field Formatters (UIFormatters) app resource.
When specifying the various different parts of the format a sample is shown so the user has a visual cue as to the type of value that is needed.

This must be managed at the discipline-level!

The image below shows an examples of a format that is used within an Accession Number on an Accession form. The Accession Number must have a 4 digit number (that represents the current year) then a two alphabet-only string followed by the number portion that is unique for all Accession Numbers.

Users can hover over the field to see the required format if necessary:

In the example above the ‘###’ portion of the Accession Number indicates that it is set to automatically increment. If it were not, the field template would appear as: ‘2026-AA-NNN’.

Change Catalog Number Format

The steps involved in changing the catalog number format are different than changing the format of any other field. For more information, see the following document:

Building a Formatter

For each part row:

  1. Type dropdown: Select the segment type (Year, Separator, Constant, Numeric, etc.).
  2. Size control: Set how many characters this segment is.
  3. Value/Placeholder: Enter the text or pattern that should appear when rendering the formatter.
  4. Auto-numbering checkboxes (if applicable): Enable automatic numbering within that part, including year-based sequences where supported.

Use the :trash_: (trash) icon to remove unnecessary parts and add rows as needed to match your desired format.

Types

Part Type Description Notes
Year Inserts the current year (or a fixed number of digits) and supports year-based autonumbering. Use for date-based prefixes; size controls digit count.
Separator Adds a literal character or string (dash, slash, etc.) between formatter segments. Ideal for visual grouping; no validation beyond the literal value.
Constant Inserts a fixed literal value such as a prefix or code. Enter the exact text that should always appear.
Numeric Represents a fixed-width numeric sequence, optionally auto-incremented. Supports autonumbering/auto-increment and handles zero-padding.
Alphanumeric Accepts letters and digits in a fixed-width segment. Useful for mixed codes; validates against [A-Z0-9].
Alpha Restricts input to letters only. Validation enforces [A-Za-z] repeated by size.
Any character Matches any character for the specified length. Good for free-form segments with length limits.
Regular expression (Regex) Uses a custom regular expression segment (without leading ^/$). Enables complex patterns when other types can’t express the requirement. Documentation is available here on how to use this segment type.

Preview & Validation

  • As you edit parts, the preview updates to show the placeholder or sample value.
  • Validation ensures the combined pattern matches the rules you’ve defined, alerting you if input values don’t comply.

Common Use Cases

  • Auto-numbered fields: Combine Year, Separator, and Numeric parts with auto-increment enabled.
  • Fixed prefixes: Use Constant or Separator parts to insert hyphens, letters, or other literals.
  • Flexible segments: Regex parts allow custom patterns for advanced formatting needs.

Save the formatter when the preview looks correct—your configuration will then control how data is presented for the selected field.

Numbering and Auto-Incrementing Behavior

This describes the behavior of auto-incrementing for a numeric segment of a field format (where Auto-number and/or Auto-number by year is checked).

Incrementing Behavior

When you have a numeric incrementing field segment (like ABC-####), it automatically identifies the highest value and adds 1 to it.

For example, consider the following three records in the Accession table:

Accession Number
ABC-0001
ABC-0003
ABC-0301
ABC-0502

When you create a new Accession Number, either through the data entry forms or via the WorkBench using the auto-incrementing functionality (e.g., leaving the field as ABC-###), it generates the number ABC-0503.

Accession Number
ABC-0001
ABC-0003
ABC-0301
ABC-0502
ABC-0503

Specify does not fill in the gaps between numbers automatically. Those values will need to be entered manually via WorkBench or Batch Edit, or filled in using Bulk Carry Forward.

Scoping

Field formats are assigned at the discipline level in the Schema Config, so the format set will be shared for all collections within that discipline. For more information, see Specify Institutional Scopings.

Auto-incrementing is based on the table scope. For example, since Collection Object is scoped to the Collection, the CatalogNumber field will increment within the collection. The same field in another collection will start auto-incrementing from the lowest value in that particular Collection.

Examples (Field Name - Scope):
Catalog Number - Increments at the Collection level
Loan Number - Increments at the Discipline level
Accession Number - Increments at the Division/Institution* level
Preparation Barcode - Increments at the Collection level

Default Field Formats in Specify

The default field formats in Specify are defined in the default Field Formatters (UIFormatters) app resource and are crucial for ensuring consistent, valid, and unique identifiers across core tables such as Accession Number, Catalog Number, Loan Number, and others. Each format is associated with a specific table and a specific field within that table (using the field attribute, e.g., Accession Number). This explicit linkage ensures that each format is only applied to the appropriate field in the correct table.


Customizing an Existing Format

  1. First, determine which field you would like to change or add a field format for.

    In this example, I am looking at “Accession Number” in the "Accession table. It has a format assigned by default.

  2. Open the Schema Config tool from the User Tools menu after clicking on your :usercircle_: Username in the navigation menu.

  3. Select your configured language and then the table that contains the field you wish to change or assign a field format in.

    Since I am changing the “Accession Number” format, I will choose “Accession”:

  4. Select the field that you wish to assign or change the format for.

    In my case, it looks like it has already been assigned the format AccessionNumber, which is done by default in new Specify disciplines.

    If you do not yet have a format assigned, you can pick from one of the defaults available or from those already configured in your database:

  5. If you want to change the formats available, or wish to add a new format, you must now proceed to the App Resources viewer.

    To get there, we need to once again click on :usercircle_: Username in the navigation menu to get to the User Tools menu. From there, click App Resources.

    From here, you need to navigate to the # Field Formatters resource. This should be at the discipline level. If you do not see it, you can click :plus_: Add Resource button to create one for the first time.

  6. Now I can adjust the AccessionNumber format that was assigned in the Schema Config, or I can create a new format

    In this example, I want the format to go from 2026-AA-### to 2026-EN-###.

  7. Select the table that contains the field you wish to add a format to. I am going to select Accession:

    Then select the name of the field format I want to customize (e.g. AccessionNumber):

    From here, I can modify the format:

    I can change the alphanumeric “AA” segment to a constant “EN” segment:

    Now I can click Save in the bottom right hand corner of the field format resource to save the changes.

  8. After refreshing the page, I can navigate back to the Accession form and my changes are visible right away:

    If you are not seeing the changes immediately, you can log out and back in to force Specify to reload field formats!

Creating a New Field Format

  1. Similar to the steps above, navigate to the # Field Formatters resource. This should be at the discipline level, if you do not see it, you can click :plus_: Add Resource button to create one for the first time.

  2. Select the table you want to add the new field format to. In this example I want to add a new Loan Number format.

  3. Select the field you want the format to be applied to, since this is a Loan Number format, I will add the ‘Loan Number’ field

  4. Add as many fields as needed for your custom field format. In this example I want a loan number where the first segment is 2 alpha characters, followed by a dash, then a 3-digit incrementing number.

  5. Once the format is to your liking, press Save

  6. Open the Schema Config tool from the User Tools menu after clicking on your :usercircle_: Username in the navigation menu.

  7. Select your configured language and then the table that contains the field you wish to change or assign a field format in.

    Since I am create a new loanNumber format, I will choose Loan:

  8. Select the field that you wish to assign or change the format for.

    In my case, it doesn’t have a default format so I need to select field format and look in the drop down for the format I just created

[!Tip]
If your newly created format does not appear in the list try clearing your cache and checking again.

  1. Press Save
  2. Navigate to the form and see your new field format
    Loan Number in forms
1 Like