enhanced search widget related tables and features

4674
18
Jump to solution
06-23-2015 08:51 AM
RaulLeos
New Contributor II

search widget will not displace the parcel parameters of the related tables data when a search is performed. The parcel feature class has a relationship in the SDE with a table and only table information is displayed but when you click on the record it will not zoom to it. please help on xml code.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Raul,

  In version 3.4 of the widget there was not a full GUI for configuring the eSearch Widget in app builder. In 3.7 of ArcGIS Viewer for flex there is a FULL GUI for configuring the widget that takes all the need to know XML out of the equation.

   You have done well configuring the other layers, all you need to do is move the "County Parcels" from the tables to a layer and then add some fields besides the GIS_Data_file_as_name (just like you have for your other layers), and like I said earlier use:

            <relates>
                <relate id="0" label="County Parcels" enableexport="true" icon="widgets/eSearch/assets/images/i_relate.png" enableprintgrid="true" printitle="County Tax Roll">
                    <fields all="true"/>
                    <zoomscale usegeometry="true" zoompercent="1.6"/>
                </relate>
            </relates>

View solution in original post

18 Replies
RobertScheitlin__GISP
MVP Emeritus

Raul,

   Please attach what you have in your eSearchWidget.xml currently.

0 Kudos
RaulLeos
New Contributor II

<?xml version="1.0" ?>

<configuration>

    <layers>

        <layer>

            <definitionexpression/>

            <enableexport>true</enableexport>

            <name>McAllen Parcels</name>

            <url>http://gismap.mcallen.net/mcgis/rest/services/ParcelEditing/MapServer/10</url>

            <expressions>

                <expression alias="Owners Name" textsearchlabel="Property Owner's Information">

                    <values>

                        <value prompt="Owner's Name Ex: Doe John">upper(LAST_FIRST) LIKE upper('%[value]%')</value>

                    </values>

                    <values>

                        <value prompt="Owner's City Ex: McAllen" isvaluerequired="false">upper(OWNERCITY) LIKE upper('%[value]%')</value>

                    </values>

                </expression>

                <expression alias="GEO ID" textsearchlabel="Property Tax Information">

                    <values>

                        <value prompt="Geographic ID Ex: M1950-00-061-0000-00">GEO_ID = '[value]'</value>

                        <value prompt="Property ID Ex: 229138" isvaluerequired="false">PROP_ID = '[value]'</value>

                    </values>

                </expression>

                <expression alias="Zip Code" textsearchlabel="Search By Zip Code:">

                    <values>

                        <value prompt="Example: 78501">upper(OWNERZIP) LIKE upper('%[value]%')</value>

                    </values>

                </expression>

            </expressions>

            <graphicalsearchlabel>Use one of the graphical search tools to select McAllen Parcels</graphicalsearchlabel>

            <spatialsearchlayer>true</spatialsearchlayer>

            <titlefield>GEO_ID</titlefield>

            <fields all="false">

                <field name="GEO_ID" alias="GEO ID" hyperlinkgridfield="false" gridfield="true"/>

                <field name="PROP_ID" alias="Prop ID" hyperlinkgridfield="false" gridfield="true"/>

                <field name="PIDN" alias="PIDN" hyperlinkgridfield="false" gridfield="true"/>

                <field name="LAST_FIRST" alias="Last, First" gridfield="true" gridfieldonly="true"/>

                <field name="LAST_NAME" alias="Owner's Last Name" gridfield="true" gridfieldonly="true"/>

                <field name="FIRST_NAME" alias="Owner's First Name" gridfield="true" gridfieldonly="true"/>

                <field name="ADRS_1" alias="Owner's Addr1" gridfield="true" gridfieldonly="true"/>

                <field name="ADRS_2" alias="Owner's Addr2" gridfield="true" gridfieldonly="true"/>

                <field name="OWNERADD_2" alias="Owner's Addr3" gridfield="true" gridfieldonly="true"/>

                <field name="OWNERCITY" alias="Owner's City" gridfield="true" gridfieldonly="true"/>

                <field name="OWNERSTATE" alias="Owner's State" gridfield="true" gridfieldonly="true"/>

                <field name="OWNERZIP" alias="Owner's Zip Code" gridfield="true" gridfieldonly="true"/>

                <field name="LEGALDESCR" alias="Legal Decription" gridfield="true" gridfieldonly="true"/>

                <field name="LEGAL_2" alias="Legal 2" gridfield="true" gridfieldonly="true"/>

                <field name="PROPERTYUS" alias="Property Use" gridfield="true" gridfieldonly="true"/>

                <field name="LANDVALUE" alias="Land Value" gridfield="true" gridfieldonly="true"/>

                <field name="IMPROVALUE" alias="Improvement Value" gridfield="true" gridfieldonly="true"/>

                <field name="STREET" alias="Street" gridfield="true" gridfieldonly="true"/>

                <field name="STREETNUMB" alias="Street Number" gridfield="true" gridfieldonly="true"/>

                <field name="BLOCKNUMBE" alias="Block Number" gridfield="true" gridfieldonly="true"/>

                <field name="STREETDIRE" alias="Sreet Direction" gridfield="true" gridfieldonly="true"/>

                <field name="STREETNAME" alias="Sreet Name" gridfield="true" gridfieldonly="true"/>

                <field name="STREETSUFF" alias="Street Suffix" gridfield="true" gridfieldonly="true"/>

                <field name="UNITNUMBER" alias="Unit Number" gridfield="true" gridfieldonly="true"/>

                <field name="SITUSADDRE" alias="Situs Address" gridfield="true" gridfieldonly="true"/>

                <field name="YEAR" alias="Year" gridfield="true" gridfieldonly="true"/>

                <field name="SUBDIVISIO" alias="Subdivision" gridfield="true" gridfieldonly="true"/>

                <field name="BLOCK" alias="Block" gridfield="true" gridfieldonly="true"/>

                <field name="LOT" alias="Lot" gridfield="true" gridfieldonly="true"/>

                <field name="SPLITS" alias="Splits" gridfield="true" gridfieldonly="true"/>

                <field name="Entities" alias="Entities" gridfield="true" gridfieldonly="true"/>

                <field name="HCAD" alias="HCAD" gridfieldonly="true" hyperlinkgridfield="true" hyperlinkaliastext="Hidalgo County Appraisal" visible="false" hyperlinkgridicon="assets/images/TaxDoc.png"/>

            </fields>

            <links>

                <link alias="View Link" disablelinksifnull="true">

                    <![CDATA[{URL}]]>

                    <icon><![CDATA[assets/images/TaxDoc.png]]></icon>

                </link>

            </links>

            <zoomscale>102100</zoomscale>

            <zoomscale usegeometry="true" zoompercent="2"/>

            <autoopendatagrid>true</autoopendatagrid>

            <queryattachments>false</queryattachments>

            <relates/>

            <symbology>

                <simplefillsymbol color="0xffcc99" alpha="0.3">

                    <outline color="0xff0000" alpha="0.8" width="2"/>

                </simplefillsymbol>

            </symbology>

        </layer>

        <layer>

            <definitionexpression/>

            <enableexport>true</enableexport>

            <name>Subdivision</name>

            <url>http://gismap.mcallen.net/mcgis/rest/services/ParcelEditing/MapServer/14</url>

            <expressions>

                <expression alias="Subdivision" textsearchlabel="Search Only McAllen Subdivisions">

                    <values>

                        <value prompt="Example: Shadow Brook">upper(SUBD) LIKE upper('%[value]%')</value>

                    </values>

                </expression>

            </expressions>

            <graphicalsearchlabel>Use one of the graphical search tools to select Parcels</graphicalsearchlabel>

            <spatialsearchlayer>true</spatialsearchlayer>

            <titlefield>Subdivision</titlefield>

            <fields all="false">

                <field name="SUBD" alias="Subdivision" gridfield="true"/>

            </fields>

            <links/>

            <zoomscale>200000</zoomscale>

            <forcescale>true</forcescale>

        </layer>

    </layers>

    <tables>

        <table>

            <definitionexpression/>

            <enableexport>true</enableexport>

            <name>County Parcels</name>

            <url>http://gismap.mcallen.net/mcgis/rest/services/ParcelEditing/MapServer/13</url>

            <expressions>

                <expression alias="Owner's Name" textsearchlabel="Property Owner's Information">

                    <values>

                        <value prompt="Owner's Name Ex: Doe John">upper(GIS_Data_file_as_name) LIKE upper('%[value]%')</value>

                    </values>

                    <values>

                        <value prompt="Owner's City Ex: McAllen" isvaluerequired="false">upper(addr_city) LIKE upper('%[value]%')</value>

                    </values>

                </expression>

                <expression alias="GEO ID" textsearchlabel="Property Tax Information">

                    <values>

                        <value prompt="Geographic ID Ex: M1950-00-061-0000-00">GIS_Data_geo_id = '[value]'</value>

                        <value prompt="Property ID Ex: 229138" isvaluerequired="false">GIS_Data_prop_id = '[value]'</value>

                    </values>

                </expression>

                <expression alias="ZIp Code" textsearchlabel="Search By Zip Code:">

                    <values>

                        <value prompt="Example: 78501">upper(zip) LIKE upper('%[value]%')</value>

                    </values>

                </expression>

            </expressions>

            <graphicalsearchlabel>Use one of the graphical search tools to select County Parcels</graphicalsearchlabel>

            <spatialsearchlayer>true</spatialsearchlayer>

            <titlefield>GIS_Data_prop_id</titlefield>

            <fields all="false">

                <field name="GIS_Data_file_as_name" alias="HFile As Name" gridfield="true" gridfieldonly="true"/>

            </fields>

            <links>

                <link alias="View Link" disablelinksifnull="true">

                    <![CDATA[{URL}]]>

                    <icon><![CDATA[assets/images/TaxDoc.png]]></icon>

                </link>

            </links>

            <zoomscale>102100</zoomscale>

            <zoomscale usegeometry="true" zoompercent="2"/>

            <autoopendatagrid>true</autoopendatagrid>

            <queryattachments>false</queryattachments>

            <relates>

                <relate id="prop_id" label="County Parcels" enableexport="true" icon="widgets/eSearch/assets/images/i_relate.png" enableprintgrid="true" printitle="County Tax Roll">

                    <fields all="true"/>

                    <zoomscale usegeometry="true" zoompercent="1.6"/>

                </relate>

            </relates>

            <symbology>

                <simplefillsymbol color="0xffcc99" alpha="0.3">

                    <outline color="0xff0000" alpha="0.8" width="2"/>

                </simplefillsymbol>

            </symbology>

        </table>

    </tables>

    <spatialrelationships>

        <spatialrelationship>

            <name>esriSpatialRelContains</name>

            <label>entirely contained in</label>

        </spatialrelationship>

        <spatialrelationship>

            <name>esriSpatialRelIntersects</name>

            <label>intersected by</label>

        </spatialrelationship>

        <spatialrelationship>

            <name>esriSpatialRelEnvelopeIntersects</name>

            <label>intersected by envelope of</label>

        </spatialrelationship>

    </spatialrelationships>

    <bufferunits>

        <bufferunit>

            <name>UNIT_FOOT</name>

            <label>Feet</label>

        </bufferunit>

        <bufferunit selected="true">

            <name>UNIT_STATUTE_MILE</name>

            <label>Miles</label>

        </bufferunit>

        <bufferunit>

            <name>UNIT_METER</name>

            <label>Meters</label>

        </bufferunit>

        <bufferunit>

            <name>UNIT_KILOMETER</name>

            <label>Kilometers</label>

        </bufferunit>

    </bufferunits>

    <buffervalue>2</buffervalue>

    <printdatagrid>

        <addheadertoeachpage>true</addheadertoeachpage>

        <columnheaderbgcolor>0xa7a7a7</columnheaderbgcolor>

        <columnheaderfontcolor>0x000000</columnheaderfontcolor>

        <footer>

            <pageoftext>Page ## of ##</pageoftext>

            <includeprintdate format="MM-DD-YYYY L:NN A">true</includeprintdate>

            <disclaimer/>

        </footer>

    </printdatagrid>

    <removeserchlayersminmaxscale>false</removeserchlayersminmaxscale>

    <keepgraphicalsearchenabled>true</keepgraphicalsearchenabled>

    <autozoomtoresults>200000</autozoomtoresults>

    <popupsdisabled>false</popupsdisabled>

    <enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>

    <toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection>

    <tolerancebydefault>false</tolerancebydefault>

    <spatialreference>200000</spatialreference>

    <zoomscale>2400</zoomscale>

    <csvseparator>,</csvseparator>

    <textqualifier>"</textqualifier>

    <disablebuttons/>

    <defaultselectionoption>textInput</defaultselectionoption>

    <enabledrawgraphicbutton>true</enabledrawgraphicbutton>

    <enablebuffergraphicbutton>true</enablebuffergraphicbutton>

    <enablelocategraphicbutton>true</enablelocategraphicbutton>

    <enablemultigraphicssearch>false</enablemultigraphicssearch>

    <enableincludetextsearch>true</enableincludetextsearch>

    <enableaddtollerance>true</enableaddtollerance>

    <enablegraphicsbuffering>true</enablegraphicsbuffering>

    <enableprintgrid>true</enableprintgrid>

    <selectedgraphicaltool/>

    <multipartgraphicsearch>false</multipartgraphicsearch>

    <floatorfixed>float</floatorfixed>

    <relatetooltip>Show Relates</relatetooltip>

    <relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>

    <labels>

        <urlsearcherrormessage>URL search parameters are incorrect</urlsearcherrormessage>

        <includetextquery>include text query in selection criteria</includetextquery>

        <includetextquerywarn>Must be the same search layer in both

graphical and text search pages.</includetextquerywarn>

        <buffergrapicprops>Buffer graphic properties</buffergrapicprops>

        <bufferusergraphics>Buffer Graphic</bufferusergraphics>

        <norelatesfound>No related features found for:</norelatesfound>

        <norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>

        <addtolerance>Add search tolerance to point selection</addtolerance>

        <existingdrawgraphicslabel>Use Existing Enhanced Draw Widget Graphics</existingdrawgraphicslabel>

        <existinglocategraphicslabel>Use Existing Enhanced Locate Widget Graphics</existinglocategraphicslabel>

        <existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>

        <graphicalsearchlabel>Graphical Search</graphicalsearchlabel>

        <textsearchlabel>Text Search</textsearchlabel>

        <resultslabel>Results</resultslabel>

        <layerlabel>Search Layer:</layerlabel>

        <layerfieldlabel>Search Layer Field:</layerfieldlabel>

        <nolayerlabel>No search layer defined.</nolayerlabel>

        <submitlabel>Search</submitlabel>

        <pointlabel>Select by Point</pointlabel>

        <linelabel>Select by Line</linelabel>

        <rectanglelabel>Select by Rectangle</rectanglelabel>

        <polygonlabel>Select by Polygon</polygonlabel>

        <clearlabel>Clear</clearlabel>

        <loadinglabel>Loading...</loadinglabel>

        <selectionlabel>Features Selected:</selectionlabel>

        <gridresultslabel>Show Results in Grid</gridresultslabel>

        <csvdefaultname>Selected Records</csvdefaultname>

        <relatescsvdefaultname>Related Records</relatescsvdefaultname>

        <exportbtnlabel>Export...</exportbtnlabel>

        <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>

        <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>

        <bufferlabel>apply a search distance:</bufferlabel>

        <spatialsearchlabel>Spatial search</spatialsearchlabel>

        <applybufferlabel>Apply buffer</applybufferlabel>

        <searchlayerlabel>Search entities of:</searchlayerlabel>

        <enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>

        <zoomalllabel>Zoom</zoomalllabel>

        <zoomalltip>Zoom to all results</zoomalltip>

        <bufferalpha>Fill opacity</bufferalpha>

        <buffercolor>Fill color</buffercolor>

        <nobuffercolor>No fill color</nobuffercolor>

        <bufferoutlinecolor>Outline color</bufferoutlinecolor>

        <nobufferoutlinecolor>No outline color</nobufferoutlinecolor>

        <bufferoutlinewidth>Outline Width</bufferoutlinewidth>

        <configbuffergra>Configure buffer graphic properties...</configbuffergra>

        <required>*</required>

        <requiredtooltip>This field is required.

Enter a value to enable search button</requiredtooltip>

        <selectmethodtip>Click to change the selection method</selectmethodtip>

        <newselectionmethodtip>Create new selection</newselectionmethodtip>

        <addselectionmethodtip>Add to current selection</addselectionmethodtip>

        <removeselectionmethodtip>Remove from current selection</removeselectionmethodtip>

        <pagingqueryerrormsg>Four unsucessfull attempts was made to get unique values for</pagingqueryerrormsg>

    </labels>

    <symbols>

        <simplefillsymbol color="0x00ffff" alpha="0.5">

            <outline color="0xff0000" alpha="0.8" width="2"/>

        </simplefillsymbol>

        <picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0"/>

        <simplelinesymbol color="0xff0000" alpha="0.8" width="2"/>

    </symbols>

</configuration>

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raul,

  Your relate id should be a number.

            <relates>
                <relate id="0" label="County Parcels" enableexport="true" icon="widgets/eSearch/assets/images/i_relate.png" enableprintgrid="true" printitle="County Tax Roll">
                    <fields all="true"/>
                    <zoomscale usegeometry="true" zoompercent="1.6"/>
                </relate>
            </relates>
0 Kudos
RaulLeos
New Contributor II

Thanks Robert for your quick response, I have assigned the relate number as you indicated and now i get an error #1009

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raul,

   OK on closer inspection of your data and your XML your "County Parcels" as a table when it is an actual layer. The way this should work is you search a layer for some parcel and when that parcel is found you can bring up the related records for that parcel, or vice versa you can add the related table and search its fields for some data and then query the related feature layer (the actual parcel polygon) and zoom the map to that. When I move the "County Parcels" up to be a layer instead of a table and use the relate id of 0 then it works fine but as you are only returning one field "GIS_Data_file_as_name", it seems you have some configuration yet to do.

0 Kudos
RaulLeos
New Contributor II

Robert, you are right i just don't know what else the xml code needs. I am hitting my head on what it is and no clue. Do you have any ideas?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raul,

  Are you not using App Builder for Flex? If you use App Builder then you will have a GUI to use in configuring the widget (Assuming you are using Version 3.7 of Flex Viewer and the widget).

RaulLeos
New Contributor II

Robert, I am using app builder and yes I have the GUI and i am using version 3.4 of the release of the widget. I have tried looking at the config file and no clue why this is happening, but I will go ahead and look through it again and see where the problem might be. thank you for all your help

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Raul,

  In version 3.4 of the widget there was not a full GUI for configuring the eSearch Widget in app builder. In 3.7 of ArcGIS Viewer for flex there is a FULL GUI for configuring the widget that takes all the need to know XML out of the equation.

   You have done well configuring the other layers, all you need to do is move the "County Parcels" from the tables to a layer and then add some fields besides the GIS_Data_file_as_name (just like you have for your other layers), and like I said earlier use:

            <relates>
                <relate id="0" label="County Parcels" enableexport="true" icon="widgets/eSearch/assets/images/i_relate.png" enableprintgrid="true" printitle="County Tax Roll">
                    <fields all="true"/>
                    <zoomscale usegeometry="true" zoompercent="1.6"/>
                </relate>
            </relates>