Can you change the default results field of the Select Widget. At the minute when I select polygons, it returns the objectID field number beside the list of selected polygons? I want to change this from ObjectID field to another numeric ID field.
Solved! Go to Solution.
Thanks Robert, changing the displayField in the mxd source of the mapservice updated the Select tool on the app to show the field I required.
Patrick,
The select widget does not have a results view that displays attributes, so I assume you are talking about the Attribute Table Widget then. You can select which fields are show for a layer in the AT widget by configuring the AT widget for that layer using its settings dialog.
Hello Robert,
when I select several polygons and click on the layer with the no of selections beside it, the widget lists all the selected polygons by objectID number. I want to change this to a different ID number that is recorded in the layer. See image below. There is no setting available to do this on the widget, it may have to be coded in somewhere.
Thanks,
Patrick.
Patrick,
I am not sure what is going on but I can not reproduce your select widget ui. I tried 2.1, 2.2 and 2.3 and with one layer or more my widgets UI never looks like what you are displaying...
Robert if you click on the ParksFinder text in your example, it should show a list of the 2 selected sites.
I need to be able to change the default number (objectID) which attributes each site.
Patrick,
OK, When I look at the code the feature title comes from this line of code:
this.nameNode.title = this.graphic.attributes[this.displayField] || this.graphic.attributes[this.objectIdField];
Which means you just need to set a displayField for that layer in your map service.
Thanks Robert, changing the displayField in the mxd source of the mapservice updated the Select tool on the app to show the field I required.