<?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: Remove objectid from query in Esri search widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209913#M78600</link>
    <description>&lt;P&gt;I have tried a bunch of variations of of this and cannot replicate this behavior. If you provide a codepen or simplified github sample, could better help, but not sure otherwise.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Sep 2022 15:25:32 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2022-09-06T15:25:32Z</dc:date>
    <item>
      <title>Remove objectid from query in Esri search widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209833#M78598</link>
      <description>&lt;P&gt;I am developing a search and the search should operate only on two columns aka "name" and "alternate". The search Widget as Coded using ArcGIS JavaScript API 4.22:&lt;/P&gt;&lt;PRE&gt;const source: any[] = [];
searchConfig.sources.forEach((sourceItem) =&amp;gt; {
    source.push({
        layer: new FeatureLayer({
            url: sourceItem.url,
            outFields: ['*'],
        }),
        searchFields: ["name", "alternate"],
        displayField: "name",
        exactMatch: true,
        outFields: ["name", "alternate"],
        name: "source layer"
        placeholder: "whoop",
        suggestionTemplate: "Name: {name}",
        maxResults: 5,
        suggestionsEnabled: false,
    });
});

const searchWidget = new Search({
    view: stores.mapStore.mapView,
    allPlaceholder: 'quickSearch',
    sources: [],
    searchAllEnabled: true,
    locationEnabled: false,
    includeDefaultSources: false,
});
searchWidget.set('sources', source);&lt;/PRE&gt;&lt;P&gt;Unfortunately the GET call also searches for&lt;A href="https://www.lifepo4golfcartbattery.com/" target="_self"&gt;&amp;nbsp;&lt;/A&gt;the objectid:&lt;/P&gt;&lt;PRE&gt;GET HTTP://URL_TO_FEATURESERVER/1/query?f=pbf&amp;amp;maxAllowableOffset=1&amp;amp;resultRecordCount=1&amp;amp;where=(name = 68) OR (alternate = '68') OR (objectid = 68)&amp;amp;outFields=name,alternate,objectid&amp;amp;outSR=102100&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;token=MYCOOLTOKEN&lt;/PRE&gt;&lt;P&gt;I want to remove "objectid" from the fields to be searched.&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 10:20:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209833#M78598</guid>
      <dc:creator>UzmaBaloch</dc:creator>
      <dc:date>2022-09-08T10:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Remove objectid from query in Esri search widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209913#M78600</link>
      <description>&lt;P&gt;I have tried a bunch of variations of of this and cannot replicate this behavior. If you provide a codepen or simplified github sample, could better help, but not sure otherwise.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 15:25:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209913#M78600</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-09-06T15:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Remove objectid from query in Esri search widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209999#M78604</link>
      <description>&lt;P&gt;This is practically identical to &lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209833" target="_self"&gt;this post&lt;/A&gt;.&amp;nbsp; Have you tried the solution proposed there?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 18:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1209999#M78604</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2022-09-06T18:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove objectid from query in Esri search widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1210000#M78605</link>
      <description>&lt;P&gt;Sorry, wrong URL...I meant &lt;A href="https://community.esri.com/t5/arcgis-api-for-javascript-questions/remove-objectid-from-query/m-p/1205491" target="_self"&gt;this one&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 18:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1210000#M78605</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2022-09-06T18:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Remove objectid from query in Esri search widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1210426#M78613</link>
      <description>&lt;P&gt;I think&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/6522"&gt;@JoelBennett&lt;/a&gt;'s post in the other thread addresses this question.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 16:13:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-objectid-from-query-in-esri-search-widget/m-p/1210426#M78613</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2022-09-07T16:13:26Z</dc:date>
    </item>
  </channel>
</rss>

