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:
![]()
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!