I was wondering if it is possible to have more than one field, or a combination of multiple fields and strings for the displayField property for the standard search widget for Web AppBuilder? For one of my searches, I would like to include two fields so users would see both the address and municipality for the suggested result, as some addresses are in more than one municipality. This code is from the config_Search.json file in the configs\Search directory of WAB.
Here is the current snippet:
<SPAN class="punctuation token">{</SPAN>
<SPAN class="string token">"layerId"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"url"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token"><SPAN>"</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fgis.ccpa.net%2Farcgiswebadaptor%2Frest%2Fservices%2FTax_Assessment%2FParcels%2FMapServer%2F42" target="_blank">https://gis.ccpa.net/arcgiswebadaptor/rest/services/Tax_Assessment/Parcels/MapServer/42</A><SPAN>"</SPAN></SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"name"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"Property Address"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"placeholder"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"310 Allen Road"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"searchFields"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">[</SPAN>
<SPAN class="string token">"SITUS"</SPAN>
<SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"displayField"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"SITUS"</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"exactMatch"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"searchInCurrentMapExtent"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"zoomScale"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">50000</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"maxSuggestions"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">8</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"maxResults"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="number token">8</SPAN><SPAN class="punctuation token">,</SPAN>
<SPAN class="string token">"type"</SPAN><SPAN class="punctuation token">:</SPAN> <SPAN class="string token">"query"</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>I know working with the Leaflet.js library and Esri's geocoder plugin, you can have multiple fields show in the suggested text. So I'm guessing it is possible with the JS API as well.