<?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: How to dynamically change display field for suggestions in search widget? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1526781#M85488</link>
    <description>&lt;P&gt;If I did so, the same layer will appear many times in the suggestions list and I don't want that to happen.&lt;/P&gt;&lt;P&gt;I believe the best way is to use&amp;nbsp;&lt;SPAN&gt;suggestionTemplate property and add all fields used in the searchFields property.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I will attach pictures for your scenario.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1.jpg" style="width: 344px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113416i187A0CA662144C99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2.jpg" style="width: 321px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113418i9906CE61A359772A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
    <pubDate>Sat, 24 Aug 2024 14:14:34 GMT</pubDate>
    <dc:creator>AMostafaH</dc:creator>
    <dc:date>2024-08-24T14:14:34Z</dc:date>
    <item>
      <title>How to dynamically change display field for suggestions in search widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1525608#M85459</link>
      <description>&lt;P&gt;I got a problem in search widget which is when searching the displayed field for the suggestions does not match the field matched with search term.&lt;/P&gt;&lt;P&gt;Is there a way to handle it using displayField or suggestionTemplate property?&lt;/P&gt;&lt;P&gt;I'm using version 4.28.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="search.jpg" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113222i94B59F03A01D0CEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="search.jpg" alt="search.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 07:59:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1525608#M85459</guid>
      <dc:creator>AMostafaH</dc:creator>
      <dc:date>2024-08-22T07:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change display field for suggestions in search widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1526436#M85474</link>
      <description>&lt;P&gt;Make sure to change includeDefaultSources to false.&amp;nbsp; I also make sure my sources searchFields, outFields, and diplayField are all the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const searchWidget = new Search({
      view: theView,
      searchAllEnabled: true,
      maxResults: 10000000,
      maxSuggestions: 10000000,
      title: "Quick Parcel Search",
      label: "Quick Parcel Search",
      includeDefaultSources: false,
      locationEnabled: false,
      exactMatch: false, 
      sources: [
        {
          layer: parcelLayer,
          searchFields: ["PartyName_1"],
          name: "Search by Owner",
          exactMatch: false,
          outFields: ["PartyName_1"],
          displayField: "PartyName_1",         
        },
        {
          layer: parcelLayer,
          searchFields: ["PropertyAddress"],
          name: "Search by Address",
          exactMatch: false,
          outFields: ["PropertyAddress"],
          displayField: "PropertyAddress",
        },
        {
          layer: parcelLayer,
          searchFields: ["QuickRefID"],
          name: "Search by Quick Reference ID",
          exactMatch: false,
          outFields: ["QuickRefID"],
          displayField: "QuickRefID",         
        }
      ],           
    });&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 23 Aug 2024 14:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1526436#M85474</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2024-08-23T14:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to dynamically change display field for suggestions in search widget?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1526781#M85488</link>
      <description>&lt;P&gt;If I did so, the same layer will appear many times in the suggestions list and I don't want that to happen.&lt;/P&gt;&lt;P&gt;I believe the best way is to use&amp;nbsp;&lt;SPAN&gt;suggestionTemplate property and add all fields used in the searchFields property.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I will attach pictures for your scenario.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1.jpg" style="width: 344px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113416i187A0CA662144C99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2.jpg" style="width: 321px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113418i9906CE61A359772A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Sat, 24 Aug 2024 14:14:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-dynamically-change-display-field-for/m-p/1526781#M85488</guid>
      <dc:creator>AMostafaH</dc:creator>
      <dc:date>2024-08-24T14:14:34Z</dc:date>
    </item>
  </channel>
</rss>

