Is it possible to show coded values in 4.x Popups?

1090
4
Jump to solution
07-03-2018 01:23 AM
DennisPayk
New Contributor II

I created an app, using a popupTemplate from the ArcGIS API for JavaScript 4.7. Fields that use coded values are shown as 1, 2, 3 etc. in the popup. I would like to show the string values of course. Can anyone help me how to show the correct content?

Tags (2)
1 Solution

Accepted Solutions
DennisPayk
New Contributor II

Coded values in MapImageLayer Sublayers are not displayed correctly in popups in ArcGIS API for JavaScript 4.8. This was reported to tech support and registered as BUG-000115337.

View solution in original post

4 Replies
JoseBanuelos
Esri Contributor

Dennis,

If you are using a popupTemplate, then the string values should be displaying. Are you passing a map service url to a FeatureLayer, and then passing the PopupTemplate as the popupTemplate property? I have provided a screenshot of the code for an application that is displaying the string values in the popups.

These are a couple of the coded values from the map service, along with a screenshot of the popups in the application.

DennisPayk
New Contributor II

Hi Jose,

thanks a lot for the quick answer. As you described, it works when using the MapServer as FeatureLayer. Thanks for that hint.

What I tried was, adding the layer as sublayer of a MapImageLayer. In that case, the numbers only are displayed, see the following screenshot:

Details of the layer can be seen here: Layer: Störungen (ID: 0) 

Is this a bug or may it be considered as a new feature request for the 4.x api?

Kind regards,

Dennis

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Dennis,

   I have been able to reproduces your issue in 4.7 and 4.8 so it is a bug that needs to be reported to tech support.

0 Kudos
DennisPayk
New Contributor II

Coded values in MapImageLayer Sublayers are not displayed correctly in popups in ArcGIS API for JavaScript 4.8. This was reported to tech support and registered as BUG-000115337.