Agent table: VarType field

I don’t understand what the field Var Type is for in the New Agent Table.
Thank you!

Hi @Amelie,

To start, I’d like to give some background for other users who have the same question as you!

The “Agent” table contains details about individuals, groups, and organizations. Agent roles may include collector, determiner, preparer, cataloger, donor, permit issuer, and more. The “Agent” table has a link to another table named “Agent Variant” through the variants relationship field. This can be added to the “Agent” form by adding the following snippet to the form definition:

    <cell type="subview" viewname="AgentVariant" id="10" name="variants" colspan="19"/>

The “Agent Variant” table is primarily used by Botanists for capturing Variant and Vernacular names. This table is searchable but does not have any specific business rules associated with it.

Form Definition for Agent Variant

The full default form definition for the “Agent Variant” table is as follows:

            <desc><![CDATA[The AgentVariant form.]]></desc>
            <columnDef os="lnx">115px,2px,200px,5px,70px,2px,523px,p,p:g</columnDef>
            <columnDef os="mac">130px,2px,150px,5px,80px,2px,663px,p:g</columnDef>
            <columnDef os="exp">p,2px,max(p;190px),5px,100px,2px,p:g</columnDef>
            <rowDef auto="true" cell="p" sep="2dlu"/>
                  <cell type="label" labelfor="2"/>
                  <cell type="field" id="2" name="varType" uitype="combobox" />
                  <cell type="label" labelfor="3"/>
                  <cell type="field" id="3" name="name" uitype="text"/>

If you were to customize the pick list that is assigned to this field by default (using the Schema Config), you would notice that the value for each pick list item must be an integer in the aforementioned range.

By default, there are two five agent variant types, but these can be customized by adding new items to that pick list with a title of your choosing and a value that is an integer between -128 and 127 (The varType is a “byte” field in the database which creates this restriction).

Title Value
Variant 0
Vernacular 1
Author 2
Author Abbrev. 3
Label Name 4

This field indicates the type of variant record associated with an agent: variant (0), vernacular name (1), author (2), author abbreviation (3), or associated name on a label (4). As mentioned before, these can be extended infinitely if you have other types of variants you wish to capture.

Let me know if you have questions about this!