Formatted catalog number in DwCA export

We would like to include our institution acronym into our catalog number during DwCA export.
If we follow the guides the exported catalog number is the numeric one: eg. 896415, which is our default catalog number format (CatalogNumberNumeric #########) without the leading zeros.
The corresponding part of the DwCA definition:

We have a record formatter at collection level to add prefix to the catalog number.

	<format name="CollectionObject" title="CollectionObject" class="edu.ku.brc.specify.datamodel.CollectionObject" default="true">
		<switch single="true">
			<fields>
				<field uifieldformatter="CatalogNumber" sep="NHMD">catalogNumber</field>
			</fields>
		</switch>
	</format>

When I add the formatName=“CollectionObject” attribute to the DwCA definition, we experience no change in the export.

The only solution we found is to refer the catalog number from the determination table, like this:

<field term="http://rs.tdwg.org/dwc/terms/catalogNumber" stringId="1,9-determinations,1.collectionobject.collectionObject" value="" oper="1" isNot="false" isRelFld="true" />

This way we get NHMD896415, what we wanted.

What would be the preferred process to meet the same objective in a more elegant way?

Specify 7 Version: v7.9.6.2, also in v7.10.2.3

Good Afternoon,

Thank you for bringing this to our attention! We are currently looking into the issue and finding possible explanations and solutions.

Thank you.

Good afternoon,

Thanks for reaching out and for providing the details of your current setup and the workaround you’ve found!

You are right that referring to the catalog number from the determination table to add the “NHMD” prefix, while effective, isn’t the most scalable or recommended solution. It bypasses the intended mechanism for formatting these fields.

The preferred and more robust approach to achieve this is indeed by editing the table format directly within the Schema Configuration for the CollectionObject table. This allows you to define how the catalogNumber field should be presented universally across Specify, including in your DwCA exports.

First, in the user tools go to the Schema Configuration and select collection object as your base table.

Then, click on the :pencil_: icon next to table format and add NHMD as a separator.

You can change the formatting in this tab and immediately in the preview below see what the formatting would entail.

Thanks!