Select to view content in your preferred language

esri/dijit/Search displayField multiple values

3805
2
06-04-2015 12:29 PM
shaileshgavathe
Frequent Contributor

Hi All,


Exploring esri search widet for version 3.13. It's great widget and very easy to configure. It saved lot of development time to come up with such widget.

I was wondering, if displayField can have multiple fields or combined like below. Basically i was trying to avoid us to change the map service changes to add new field with combined results.

displayFields : ["DISTRICT", "NAME"]

Or

displayFields: "DISTRICT" + "NAME"

Thanks in advance.

Thanks and Regards,

Shay,,,

Tags (1)
2 Replies
VisheshMaskey
Deactivated User

Have you tried adding the same fields used in searchFields to displayField? After finding what you were looking for, all of the fields from the feature service should be shown on the Attribute Table widget.

0 Kudos
shaileshgavathe
Frequent Contributor

thanks Vishes.

I was referring to the sample here Search multiple sources | ArcGIS API for JavaScript.

It works for one single field as displayField like below,

displayField : "DISTRICT",

Is there an option to display multiple fields or concatenate two fields as displayField like below.

displayFields: ["DISTRICT", "NAME"]

Or

displayField: "DISTRICT" + "NAME"

We are trying to avoid map service change to display concatenated results to user.

Thanks and Regards,

Shay

0 Kudos