Concatenated Display Fields Not Displaying Correctly in Feature Layer (Bug Report)

04-29-2021 08:46 PM
New Contributor III

We published a map service using 10.6.1 ArcGIS for Server (on Linux) where the label is symbolised by concatenating 3 fields:

[Road_Name] + " " + [Road_Type] + " - " + [Road_Number]

When we use this as a Feature Layer in ArcGIS API for JavaScript version 4.18.1 (with npm build), the labels show up as the following:


That is, the word "concat" appears in the label, instead of "Prince Hwy - 0000001".

This issue does not appear if using Map Image Layer.

I tried various other ways e.g. using advanced functions, JScript / VBScript etc, no luck.

In addition, I tried to do the labelling in JavaScript code with LabelClass and labelExpressionInfo, the same issue happens.

I want to submit a bug report but there isn't an easy way to do so, hence the post here.

Can someone from Esri take a look please.

0 Kudos
3 Replies
Esri Regular Contributor

Hi @HenryKo2, I think the issue you are seeing is because MapImageLayer uses SQL for the labelExpression:

Whereas FeatureLayer uses Arcade for the labelExpressionInfo:


test-app to see it in action (concatenating labels with a FeatureLayer):


0 Kudos
New Contributor III

Thanks Noah-Sager for the reply.

I should clarify, we published the map service in ArcGIS for Server with the following, using ArcMap:


Then we simply consume it as FeatureLayer in the JS app:
            this.layer = new FeatureLayer({
                url: ...,
                title: ...,
                popupEnabled: ...,
                visible: ...,
                popupTemplate: {...},


The result we got is the screenshot I posted above where "concat" happens.

We don't do anything explicit or special with the labels in JS code. 

I would expect the labels to display correctly "out-of-box", regardless of SQL or Arcade expressions.


0 Kudos
New Contributor III

I've resolved changing parser language... from Python to VB Script



0 Kudos