AnsweredAssumed Answered

Multiple Display Fields for WAB Search Widget

Question asked by pmckinneyccpa on Jun 28, 2018
Latest reply on Jun 29, 2018 by pmckinneyccpa

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:

 

{
"layerId": null,
"url": "https://gis.ccpa.net/arcgiswebadaptor/rest/services/Tax_Assessment/Parcels/MapServer/42",
"name": "Property Address",
"placeholder": "310 Allen Road",
"searchFields": [
"SITUS"
],
"displayField": "SITUS",
"exactMatch": false,
"searchInCurrentMapExtent": false,
"zoomScale": 50000,
"maxSuggestions": 8,
"maxResults": 8,
"type": "query"
},

 

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.

Outcomes