<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic useCodedValues property not working in LabelClass API 4.18 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1026930#M71776</link>
    <description>&lt;P&gt;I am trying to add a label to a featureLayer using &lt;STRONG&gt;LabelClass&lt;/STRONG&gt;. The field I wish to display as a label called &lt;STRONG&gt;mun_name&lt;/STRONG&gt; is of type "&lt;STRONG&gt;short&lt;/STRONG&gt;" and is linked to a domain. The documentation states that setting &lt;STRONG&gt;useCodedValues &lt;/STRONG&gt;to &lt;STRONG&gt;True&lt;/STRONG&gt; will make the API use the &lt;STRONG&gt;domain names&lt;/STRONG&gt; for labelling instead of the actual numbers (codes) stored in the field, but it still showing numbers on the map.&lt;BR /&gt;This is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;const mun = new FeatureLayer({
 url: `${API_URL}/rest/services/public/All/MapServer/0`,
 outFields: ["*"],
 labelingInfo: {
  labelExpressionInfo: {
    expression: "$feature.mun_name",
  },
  symbol: {
    type: "text",
    symbolLayers: [
      {
        type: "text",
        material: { color: "black" },
        halo: {
          color: "yellow",
          size: 0.4,
        },
        size: 14,
      },
    ],
  },
  useCodedValues: true,
}
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps: The domain values work nicely when displaying that field in the layer's popup. The problem appears only when trying to use that field as a label using LabelClass. I also tried setting&amp;nbsp;useCodedValues to both True, False and removing it.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Mon, 15 Feb 2021 19:27:52 GMT</pubDate>
    <dc:creator>AhmadLibda</dc:creator>
    <dc:date>2021-02-15T19:27:52Z</dc:date>
    <item>
      <title>useCodedValues property not working in LabelClass API 4.18</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1026930#M71776</link>
      <description>&lt;P&gt;I am trying to add a label to a featureLayer using &lt;STRONG&gt;LabelClass&lt;/STRONG&gt;. The field I wish to display as a label called &lt;STRONG&gt;mun_name&lt;/STRONG&gt; is of type "&lt;STRONG&gt;short&lt;/STRONG&gt;" and is linked to a domain. The documentation states that setting &lt;STRONG&gt;useCodedValues &lt;/STRONG&gt;to &lt;STRONG&gt;True&lt;/STRONG&gt; will make the API use the &lt;STRONG&gt;domain names&lt;/STRONG&gt; for labelling instead of the actual numbers (codes) stored in the field, but it still showing numbers on the map.&lt;BR /&gt;This is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;const mun = new FeatureLayer({
 url: `${API_URL}/rest/services/public/All/MapServer/0`,
 outFields: ["*"],
 labelingInfo: {
  labelExpressionInfo: {
    expression: "$feature.mun_name",
  },
  symbol: {
    type: "text",
    symbolLayers: [
      {
        type: "text",
        material: { color: "black" },
        halo: {
          color: "yellow",
          size: 0.4,
        },
        size: 14,
      },
    ],
  },
  useCodedValues: true,
}
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ps: The domain values work nicely when displaying that field in the layer's popup. The problem appears only when trying to use that field as a label using LabelClass. I also tried setting&amp;nbsp;useCodedValues to both True, False and removing it.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 Feb 2021 19:27:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1026930#M71776</guid>
      <dc:creator>AhmadLibda</dc:creator>
      <dc:date>2021-02-15T19:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: useCodedValues property not working in LabelClass API 4.18</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1085105#M74109</link>
      <description>&lt;P&gt;I'm having the same problem. The feature layer is only labeling with the code (abbreviation), not the full description, from the domain. I tried useCodedValues = true with version 4.20 and much older versions of the 4.x API. Nothing works, although it does work with MapImageLayer sublayers.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const labelClassWaterLine = {
labelPlacement: "above-center",
labelExpressionInfo: {
  expression: "$feature.PIPEMATERIAL + TextFormatting.NewLine + 
  $feature.EXPOSURETYPE"
},
useCodedValues: true,
symbol: {
  type: "text", 
  color: "red",
  haloSize: 2,
  haloColor: "white"
  }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 20:52:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1085105#M74109</guid>
      <dc:creator>Andy_Morgan</dc:creator>
      <dc:date>2021-08-02T20:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: useCodedValues property not working in LabelClass API 4.18</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1145403#M76392</link>
      <description>&lt;P&gt;I don't know if you still have this issue or still need it solved, but I was able to this issue by using the labelExpression attribute and the useCodedValues to true.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KoltWright_0-1645137095893.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/34286iBD7233A5A0AFE16A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KoltWright_0-1645137095893.png" alt="KoltWright_0-1645137095893.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 22:34:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/usecodedvalues-property-not-working-in-labelclass/m-p/1145403#M76392</guid>
      <dc:creator>KoltWright</dc:creator>
      <dc:date>2022-02-17T22:34:52Z</dc:date>
    </item>
  </channel>
</rss>

