Select to view content in your preferred language

Select Widget Customisation

1640
6
Jump to solution
02-14-2017 09:05 AM
PatrickMcGarry
New Contributor III

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.

0 Kudos
1 Solution

Accepted Solutions
PatrickMcGarry
New Contributor III

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.

View solution in original post

0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
PatrickMcGarry
New Contributor III

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.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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...

0 Kudos
PatrickMcGarry
New Contributor III

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.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

PatrickMcGarry
New Contributor III

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.

0 Kudos