Hi,
Following this post Edit the Query Combo Box Simple Search Form, I added the geography to the combobox search of the locality table.
The search.views.xml locality element looks like this now:
<viewdef type="form"
name="LocalitySearch"
class="edu.ku.brc.specify.datamodel.Locality"
gettable="edu.ku.brc.af.ui.forms.DataGetterForHashMap"
settable="edu.ku.brc.af.ui.forms.DataSetterForHashMap">
<desc><![CDATA[The Locality Search Form]]></desc>
<enableRules/>
<columnDef>p,3dlu,p</columnDef>
<rowDef>p,2dlu,p,2dlu,p</rowDef>
<rows>
<row>
<cell type="label" labelfor="1"/>
<cell type="field" id="1" name="LocalityName" isrequired="true" uitype="text"/>
</row>
<row>
<cell type="label" labelfor="2"/>
<cell type="field" id="2" name="geography.FullName" uitype="text"/>
</row>
</rows>
</viewdef>
And the form looks like this:
The geography field is not active. I thought maybe this field in not searched in the search_config.xml locality query, so I created an App Resource and loaded the search_config.xml file into it.
It turns out the geography field is already in the query:
<table id="114" tableid="2" name="LocalitySearch" priority="1" color="30, 144, 255">
<detailView icon="Locality">
<sql>
<![CDATA[SELECT LocalityID, LocalityName,Latitude1,Longitude1,FullName FROM locality LEFT JOIN geography ON geography.geographyid = locality.geographyid WHERE (DisciplineID = DSPLNID) AND (%s)]]>
</sql>
<captions>
<caption tableid="2" col="LocalityID" visible="false"/>
<caption tableid="2" col="LocalityName"/>
<caption tableid="2" col="Latitude1"/>
<caption tableid="2" col="Longitude1"/>
<caption tableid="3" col="FullName"/>
</captions>
</detailView>
</table>
But the geography field names in the query look wrong. I changed them to
geography.GeographyID and geography.FullName, but still the field is not active in the combobox search form.
May it be that Specify 7 does not find the app resource I created with the search_config.xml? Or is there something wrong in the query?
Thanks.