Auto-numbering not working

Specify 7 System Information - 2026-07-03T08_47_47.401Z.txt (335.8 KB)

We would like to use the auto-numbering function for our catalog numbers. I managed to get it working for 1 out of our 4 collections, but I cannot remember how I did it at the time. I have now reached the conclusion that I need to ask for help.

What is also strange is that when I try to make changes now to the one that is working, the changes do not appear there either.

I have created a Field Formatter at the Collection level. When I try to use Add Resource at the Discipline level, it automatically jumps down to the Collection level.

In my UIFormatters I have the following code related to Catalog Number:

<format system="true" name="CatalogNumber" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber" default="true">

<autonumber>edu.ku.brc.specify.dbsupport.CollectionAutoNumberAlphaNum</autonumber>

    <field type="year" size="4" value="YEAR" byyear="true"/>

    <field type="separator" size="1" value="-"/>

    <field type="alphanumeric" size="2" value="AA"/>

    <field type="separator" size="1" value="-"/>

    <field type="numeric" size="3" inc="true"/>

  </format>


  <format system="false" name="CatalogNumberAlphaNumByYear" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber">

    <autonumber>edu.ku.brc.specify.dbsupport.CollectionAutoNumberAlphaNum</autonumber>

    <field type="constant" size="2" value="A-"/>

    <field type="year" size="4" value="YEAR" byyear="true"/>

    <field type="separator" size="1" value="-"/>

    <field type="numeric" size="6" inc="true"/>

  </format>

 

  <format system="true" name="CatalogNumberNumeric" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber" default="false">

    <autonumber>edu.ku.brc.specify.dbsupport.CollectionAutoNumber</autonumber>

    <external>edu.ku.brc.specify.ui.CatalogNumberUIFieldFormatter</external>

  </format>

  <format system="true" name="CatalogNumberString" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber" default="false">

    <external>edu.ku.brc.specify.ui.CatalogNumberStringUIFieldFormatter</external>

  </format>

 

  <format system="false" name="CatalogNumberWithPrefix" class="edu.ku.brc.specify.datamodel.CollectionObject" fieldname="catalogNumber">

  <autonumber>edu.ku.brc.specify.dbsupport.CollectionAutoNumberAlphaNum</autonumber>

  <field type="constant" size="2" value="A-"/>

  <field type="year" size="4" value="YEAR" byyear="true"/>

  <field type="separator" size="1" value="-"/>

  <field type="numeric" size="5" inc="true"/>

</format>

I have tried copy-pasting the configuration from the collection that works into the ones that do not, but it has not made any difference.

I hope someone can help a newbie. :slightly_smiling_face:

Hi @ccm,

Great question!

Firstly, the Field Formatter/UIFormatters file should actually be added at the discipline level in App Resources. Since you are on v7.11.3, the field format should then be assigned to the catalogNumFormatName field on the Collection table in Specify.

To do that, create a query on the Collection table by /specify/query/new/collection to your URL.

Then, click Browse In Forms and edit the Catalog Number Format Name field value to match the desired field format name and Save.

You can also assign the format to the field in Schema Config, but it will need entered in the collection record to work. Ideally, you would update to v7.12 and get to use the System Config tool as described in How to Change the Catalog Number Format.