<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Search Widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483188#M44992</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any luck with resolving this? &amp;nbsp; &amp;nbsp;I would like to do the same thing and change the where query that is used by the widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jul 2017 23:15:59 GMT</pubDate>
    <dc:creator>MeleKoneya</dc:creator>
    <dc:date>2017-07-14T23:15:59Z</dc:date>
    <item>
      <title>Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483187#M44991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we use the search widget for a search in a custom feature layer.&lt;BR /&gt;This works fine if we have an ID field for the layer and can find the result in one single field.&lt;/P&gt;&lt;P&gt;Now we want the users to enter TWO search terms seperated by a column delimiter and search for one term in one field and for the other in another field.&lt;BR /&gt;I was hoping to achieve this by altering the query with the searchQueryParams option, but no luck so far.&lt;/P&gt;&lt;P&gt;It it possible to overwrite the where-part of the underlying query with that option?&lt;/P&gt;&lt;P&gt;Has anybody got an example for how to do that?&lt;BR /&gt;Is it possible to hook up an entirely new query with the search widget?&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We use JS API 3.20, but I guess this is version independent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 13:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483187#M44991</guid>
      <dc:creator>HeikeFriedrichs</dc:creator>
      <dc:date>2017-05-31T13:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483188#M44992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any luck with resolving this? &amp;nbsp; &amp;nbsp;I would like to do the same thing and change the where query that is used by the widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 23:15:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483188#M44992</guid>
      <dc:creator>MeleKoneya</dc:creator>
      <dc:date>2017-07-14T23:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483189#M44993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;sorry for the delay. I had given up hope that anybody would answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We found two soulutions (both work):&lt;/P&gt;&lt;P&gt;- we added a (redundant) field in the table with the two fields concatenated and use that combined field in the search widget&amp;nbsp;instead&lt;/P&gt;&lt;P&gt;- we added two dijit Input fields and a search button in the map as a completely separate search option, onClick on the button starts a query that gives you full flexibility&lt;/P&gt;&lt;P&gt;If field #1 (schiebersearch1) contains data, its content gets searched in the database field ROHRBEZEICHNUNG (caseinsensitive and via like match)&lt;/P&gt;&lt;P&gt;if both Inputs were filled, the where String continues with "and"&lt;/P&gt;&lt;P&gt;field #2 (schiebersearch2) gets searched in the database field SCHIEBERNUMMER&lt;/P&gt;&lt;P&gt;see below (hope that makes sense)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution 1 is much easier, if you have control over your data&lt;/P&gt;&lt;P&gt;-----------------------------------&lt;/P&gt;&lt;P&gt;var schieberSearch = new Query();&lt;/P&gt;&lt;P&gt;schieberSearch.where="";&lt;/P&gt;&lt;P&gt;[...]&lt;/P&gt;&lt;P&gt;schieberSearch.where="lower(ROHRBEZEICHNUNG) like '" + dojo.byId("schiebersearch1").value.toLowerCase() + "%'";&lt;/P&gt;&lt;P&gt;if(dojo.byId("schiebersearch2").value.length&amp;gt;0){&lt;/P&gt;&lt;P&gt;if(schieberSearch.where.length&amp;gt;0)&lt;/P&gt;&lt;P&gt;schieberSearch.where=schieberSearch.where + " and ";&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;schieberSearch.where=schieberSearch.where +"SCHIEBERNUMMER like '"+dojo.byId("schiebersearch2").value+"%'";&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Jul 2017 15:24:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/search-widget/m-p/483189#M44993</guid>
      <dc:creator>HeikeFriedrichs</dc:creator>
      <dc:date>2017-07-26T15:24:09Z</dc:date>
    </item>
  </channel>
</rss>

