How to add taxon name column to accession items subview

Hi! I got the request to swap out a column “project number” in the accession collection object items with (current) “taxon full name” and additionally “type status”.

Looking a the editor, it is not entirely clear what to write in the “name” field of the extra column to produce these.

<viewdef name="AccessionItems" class="edu.ku.brc.specify.datamodel.CollectionObject" type="form" gettable="edu.ku.brc.af.ui.forms.DataGetterForObj" settable="edu.ku.brc.af.ui.forms.DataSetterForObj">
	<desc>The Collection Object Subform for Accessions.</desc>
	<enableRules/>
	<columnDef>105px,2px,120px,5px,100px,2px,95px,5px,102px,2px,95px,5px,97px,2px,95px,p:g</columnDef>
	<columnDef os="lnx">115px,2px,117px,5px,110px,2px,105px,5px,121px,2px,105px,5px,116px,2px,105px,p:g</columnDef>
	<columnDef os="mac">130px,2px,130px,5px,118px,2px,130px,5px,121px,2px,130px,5px,120px,2px,130px,p:g</columnDef>
	<columnDef os="exp">p,2px,min(p;150px),5px:g,p,2px,p:g(2),5px:g,p,2px,p:g(2),5px:g,p,2px,p:g(2)</columnDef>
	<rowDef auto="true" cell="p" sep="2px"/>
	<rows>
		<row>
			<cell type="label" labelfor="1"/>
			<cell type="field" id="1" name="catalogNumber" uitype="formattedtext"/>
			<cell type="label" labelfor="2"/>
			<cell type="field" id="2" name="altCatalogNumber" uitype="text"/>
			<cell type="label" labelfor="3"/>
			<cell type="field" id="3" name="collection.collectionName" uitype="dsptextfield"/>
			<cell type="label" labelfor="4"/>
			<cell type="field" id="4" name="projectNumber" uitype="text"/>
			<!--<cell type="label" labelfor="5"/>
			<cell type="field" id="5" name="determinations.taxon.fullName" uitype="dsptextfield"/>-->
		</row>
	</rows>
</viewdef>

Note: The columns should probably be non-editable, if possible.

Hi @fedoras,

I believe name="currentDetermination.preferredTaxon.fullName" and currentDetermination.typeStatusName should get the values you are after! I have put it up on the demo instance so you can see what it looks like:

https://sp7demofish.specifycloud.org/specify/view/accession/1/

and a screenshot:

1 Like