Select to view content in your preferred language

Outfields in Search Widget (WAB)

662
1
Jump to solution
05-11-2018 09:45 AM
Carlos_ArturoSarmiento_Royero
Occasional Contributor

I am using the wab search widget with multiple sources, but it is skipping the field of outfields. Thanks

{
"allPlaceholder": "",
"showInfoWindowOnSelect": true,
"sources": [
{
"url": "https://services1.arcgis.com/MUGZBRzuQOwSq7Du/ArcGIS/rest/services/Limites/FeatureServer/0",
"name": "Departamentos",
"placeholder": "Atlántico",
"searchFields": [
"cod_dpto",
"dpto"
],
"outFields": [
"cod_dpto",
"dpto",
"acto",
"anno"
],
"displayField": "dpto",
"exactMatch": false,
"searchInCurrentMapExtent": false,
"zoomScale": 50000,
"maxSuggestions": 6,
"maxResults": 6,
"type": "query",
"highlightSymbol": {
"color": [
255,
0,
0,
128
],
"outline": {
"color": [
0,
166,
81,
255
],
"width": 1,
"type": "esriSLS",
"style": "esriSLSSolid"
},
"type": "esriSFS",
"style": "esriSFSSolid"
}
}

}

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Carlos,

   The widget is hard coded to use all fields as the sources outFields property. You should have noticed that there was no widget setting for specifying the outFields. You would have to adjust code in the Widget.js to allow for specifying a select array of outFields.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Carlos,

   The widget is hard coded to use all fields as the sources outFields property. You should have noticed that there was no widget setting for specifying the outFields. You would have to adjust code in the Widget.js to allow for specifying a select array of outFields.