Marie, So in Version 3.0 there is some issue you are going to have to work around. You need to use uniquevalsfromfield instead of domain as using domain in 3.0 will force you to have a value for each domain field. The next issue you will have to Just deal with in version 3.0 is that once you have chosen a value from the dropdown list the search will automatically be executed (this was fixed in latter releases). I am going to assume that your diameter field is numeric and not a string and I adjusted your expression for that assumption.Here is a corrected configuration for your layer: <layer> <definitionexpression></definitionexpression> <enableexport>true</enableexport> <name>Water Mains</name> <url>http://gis-01/ArcGIS/rest/services/MAP_DOCS/dmww_water_server/MapServer/23</url> <expressions> <expression alias="Material,Diameter and Install Date" textsearchlabel="Search Material:" isvaluerequired="false"> <values> <value prompt="Material" uniquevalsfromfield="MATERIAL" isvaluerequired="false">MATERIAL = '[value]'</value> <value prompt="Diameter" uniquevalsfromfield="DIAMETER" isvaluerequired="false" operator="AND">DIAMETER = [value]</value> <value prompt="Example: 01/01/2007 Install Date" isvaluerequired="false" operator="AND">INSTALLDATE >= date '[value] 00:00:00'</value> </values> </expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Water Mains</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>FACILITYID</titlefield> <fields all="false"> <field name="DIAMETER" gridfield="true" /> <field name="FACILITYID" gridfield="true" /> <field name="MATERIAL" gridfield="true" /> <field name="INSTALLDATE" gridfield="true" dateformat="MM/DD/YYYY" useutc="true" /> </fields> <links/> <zoomscale usegeometry="true" zoompercent="1.6"></zoomscale> <autoopendatagrid>false</autoopendatagrid> <queryattachments>false</queryattachments> <relates/> <symbology> <simplelinesymbol color="0x00ff00" alpha="0.8" width="2" /> </symbology> </layer>
<layer> <definitionexpression></definitionexpression> <enableexport>true</enableexport> <name>Water Mains</name> <url>http://gis-01/ArcGIS/rest/services/MAP_DOCS/dmww_water_server/MapServer/23</url> <expressions> <expression alias="Material,Diameter and Install Date" textsearchlabel="Search Material:" isvaluerequired="false"> <values> <value prompt="Material" uniquevalsfromfield="MATERIAL" isvaluerequired="false">MATERIAL = '[value]'</value> <value prompt="Diameter" uniquevalsfromfield="DIAMETER" isvaluerequired="false" operator="AND">DIAMETER = [value]</value> <value prompt="Example: 01/01/2007 Install Date" isvaluerequired="false" operator="AND">INSTALLDATE >= date '[value] 00:00:00'</value> </values> </expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Water Mains</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>FACILITYID</titlefield> <fields all="false"> <field name="DIAMETER" gridfield="true" /> <field name="FACILITYID" gridfield="true" /> <field name="MATERIAL" gridfield="true" /> <field name="INSTALLDATE" gridfield="true" dateformat="MM/DD/YYYY" useutc="true" /> </fields> <links/> <zoomscale usegeometry="true" zoompercent="1.6"></zoomscale> <autoopendatagrid>false</autoopendatagrid> <queryattachments>false</queryattachments> <relates/> <symbology> <simplelinesymbol color="0x00ff00" alpha="0.8" width="2" /> </symbology> </layer>
<value prompt="Material" field="MATERIAL" usedomain="true" isvaluerequired="false" autosubmit="false" >MATERIAL = '[value]'</value>
<value field="AquisitionCode" usedomain="true">AquisitionCode = [value]</value>
Also - the date value that you changed?? i am trying to do a greater than or equal to on the date and it seemed to be working the way i had it. is it wrong?? Is it possible to do a "between" dates ??
Casey, OK, finally I am able to see your configuration issue. I am expecting a zoomscale tag in your relate tag. As indicated in red below and you need to remove or change the symbology tag you have (which is now for a Polygon and your layer is a PolyLine), Your FacilityID field is a numeric field so your expression should not wrap the [value] in single quotes (which is the way you do for strings). The same goes for your Diameter field expression. It is normally little attention to detail things like this that trip people up. In the Next version I will do some better error traping for things like the missing zoomscale tag. <layer> <token /> <definitionexpression /> <enableexport>true</enableexport> <name>Sanitary Main</name> <url>http://GIS01.lebanon.local:6080/arcgis/rest/services/OperationalLayers/Utilities/MapServer/3</url> <expressions> <expression alias="Facility ID" textsearchlabel="Search Specific Main:" isvaluerequired="false"> <values> <value prompt="Example: 1032" isvaluerequired="false">FACILITYID = [value]</value> </values> </expression> <expression alias="Attributes" textsearchlabel="Search Mains:" isvaluerequired="false"> <values> <value prompt="Type:" isvaluerequired="false" uniquevalsfromfield="TYPE" autosubmit="false">TYPE = '[value]'</value> <value prompt="Diameter:" isvaluerequired="false" uniquevalsfromfield="DIAMETER" autosubmit="false" operator="AND">DIAMETER = [value]</value> <value prompt="Material:" isvaluerequired="false" uniquevalsfromfield="MATERIAL" autosubmit="false" operator="AND">MATERIAL = '[value]'</value> </values> </expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Main</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>Sanitary Main</titlefield> <fields all="false"> <field name="FACILITYID" gridfield="true" /> <field name="TYPE" gridfield="true" /> <field name="DIAMETER" gridfield="true" /> <field name="MATERIAL" gridfield="true" /> <field name="YEARBUILT" gridfield="true" /> <field name="EDITDATE" gridfield="true" /> <field name="INSPECTIONDATE" gridfield="true" /> </fields> <links /> <zoomscale usegeometry="true" zoompercent="2" /> <autoopendatagrid>false</autoopendatagrid> <queryattachments>false</queryattachments> <relates> <relate id="0" label="Asbuilts" enableprintgrid="false"> <fields all="false"> <field name="ASBUILTID" /> <field name="FILEPATH" hyperlinkgridfield="true" hyperlinkaliastext="View Asbuilt" linkprefix="http://GIS01/Asbuilts/" linksuffix=".pdf" /> </fields> <zoomscale usegeometry="true" zoompercent="1.6" /> </relate> </relates> <symbology> <simplefillsymbol color="0xff0000" alpha="0.5"> <outline color="0xff0000" alpha="0.8" width="2"/> </simplefillsymbol> </symbology> </layer>
<layer> <token /> <definitionexpression /> <enableexport>true</enableexport> <name>Sanitary Main</name> <url>http://GIS01.lebanon.local:6080/arcgis/rest/services/OperationalLayers/Utilities/MapServer/3</url> <expressions> <expression alias="Facility ID" textsearchlabel="Search Specific Main:" isvaluerequired="false"> <values> <value prompt="Example: 1032" isvaluerequired="false">FACILITYID = [value]</value> </values> </expression> <expression alias="Attributes" textsearchlabel="Search Mains:" isvaluerequired="false"> <values> <value prompt="Type:" isvaluerequired="false" uniquevalsfromfield="TYPE" autosubmit="false">TYPE = '[value]'</value> <value prompt="Diameter:" isvaluerequired="false" uniquevalsfromfield="DIAMETER" autosubmit="false" operator="AND">DIAMETER = [value]</value> <value prompt="Material:" isvaluerequired="false" uniquevalsfromfield="MATERIAL" autosubmit="false" operator="AND">MATERIAL = '[value]'</value> </values> </expression> </expressions> <graphicalsearchlabel>Use one of the graphical search tools to select Main</graphicalsearchlabel> <spatialsearchlayer>true</spatialsearchlayer> <titlefield>Sanitary Main</titlefield> <fields all="false"> <field name="FACILITYID" gridfield="true" /> <field name="TYPE" gridfield="true" /> <field name="DIAMETER" gridfield="true" /> <field name="MATERIAL" gridfield="true" /> <field name="YEARBUILT" gridfield="true" /> <field name="EDITDATE" gridfield="true" /> <field name="INSPECTIONDATE" gridfield="true" /> </fields> <links /> <zoomscale usegeometry="true" zoompercent="2" /> <autoopendatagrid>false</autoopendatagrid> <queryattachments>false</queryattachments> <relates> <relate id="0" label="Asbuilts" enableprintgrid="false"> <fields all="false"> <field name="ASBUILTID" /> <field name="FILEPATH" hyperlinkgridfield="true" hyperlinkaliastext="View Asbuilt" linkprefix="http://GIS01/Asbuilts/" linksuffix=".pdf" /> </fields> <zoomscale usegeometry="true" zoompercent="1.6" /> </relate> </relates> <symbology> <simplefillsymbol color="0xff0000" alpha="0.5"> <outline color="0xff0000" alpha="0.8" width="2"/> </simplefillsymbol> </symbology> </layer>
<symbology> <simplelinesymbol color="0x00ff00" alpha="0.8" width="2" /> </symbology>
Marie, The fact that your data has 2" the double quote is throwing excel for a loop... Normally the " is used as a text qualifier and the fact that your data looks like "2"","26007887", etc, etc it is an issue for excel. In excel if you set the Text Qualifier to none than you will see how it is suppose to work minus the double qoutes wrapping each column.
<expression alias="Road Name and Zip" textsearchlabel="Search by Road Name and Left Zipcode and Right Zip:" isvaluerequired="true"> <values> <value prompt="Example: ANDREW" isvaluerequired="false">RD_NAME = '[value]'</value> <value prompt="Example: 36201" isvaluerequired="false" operator="AND">ZIP_L = [value]</value> <value prompt="Example: 36201" isvaluerequired="false" operator="AND">ZIP_R = [value]</value> </values> </expression>
when i add the url to showdatagrid i get error #1010
Marie, In the next release you will be able to specify the Text Qualifier in the eSearchWidget.xml and this would allow you to use a single quote instead of a double and that would help for your data having the double quote in it for inches.
Thank you Robert. When do you anticipate that release?i am having another quirky thing happening. I have a field Material that i could not get to run the query and i finally added the quotes to the value and it runs and it is definatley a text field
i finally added the quotes to the value and it runs and it is definitely a text field
omg am i backwards? numbers get the quotes or text gets the quotes?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.