Adding field to query combo box search form

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"
            <desc><![CDATA[The Locality Search Form]]></desc>
                    <cell type="label" labelfor="1"/>
                    <cell type="field" id="1" name="LocalityName" isrequired="true" uitype="text"/>
                    <cell type="label" labelfor="2"/>
                    <cell type="field" id="2" name="geography.FullName" uitype="text"/>

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">
                    <![CDATA[SELECT LocalityID, LocalityName,Latitude1,Longitude1,FullName FROM locality LEFT JOIN geography ON geography.geographyid = locality.geographyid WHERE (DisciplineID = DSPLNID) AND (%s)]]>
                    <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"/>

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?


Hi @sorosoro,

At this time in query combo box search dialogs, Specify 7 cannot search on fields from related tables (in this instances, geography, but it affects a number of other tables as well).

You can use the Query Builder button in the bottom right hand side of the dialog to use the full query builder to retrieve records in the meantime until we issue a fix!

I’ve added your post to the issue for future reference. Thank you for providing those snippets of XML and for using other resources on the forum. We appreciate the work and thoughtfulness of your post!

Thank you!

Oh, sorry I did not realized there is already an issue opened for this. Good to know. Thanks!