Using Record formatter in a Form

Specify 7 System Information - 2025-09-03T13_23_48.638Z.txt (2.2 MB)

Hi,
I am trying to use a record formatter to display data in a form, but it seems that within the context of a form view definition, one cannot use a record formatter.
In my specific example, I created a record formatter to show the family of a taxon:

	<format name="Taxon_family" title="Taxon_family" class="edu.ku.brc.specify.datamodel.Taxon" default="">
		<switch single="false" field="definitionItem.rankId">
			<fields value="180">
				<field sep=" ">parent.name</field>
			</fields>
			<fields value="220">
				<field sep=" ">parent.parent.name</field>
			</fields>
			<fields value="230">
				<field sep=" ">parent.parent.parent.name</field>
			</fields>
			<fields value="240">
				<field sep=" ">parent.parent.parent.name</field>
			</fields>
			<fields value="260">
				<field sep=" ">parent.parent.parent.name</field>
			</fields>
			<fields value="140">
				<field sep=" ">name</field>
			</fields>
		</switch>
	</format>

and it works well (e.g. in queries).
But when I try to use it within a form, I get an error:
image

I get somthing close to the wanted result by using parent of parent:

<cell type="label" label="Family"/>
			<cell type="field" id="family" name="preferredTaxon.parent.parent" uitype="text" readonly="true" colspan="3"/>

However, this is only applicable to taxa defined at the species rank.

Am I missing something? Is there a way around this?

Thanks!

Hello @Eyal ,

Thank you for reaching out!

Unfortunately, at this time, there is no way to customize table formatting in a form view definition in Specify. It always uses the default format when displaying a related record on the forms. The syntax you are using (fieldName.TableFormatName) is not valid, though it is an interesting idea that has been requested before. Have you considered creating a post in New Feature Requests describing use cases and examples more in depth?

Let us know if you have any further questions.