<?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 Values of domains using hitTest in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/values-of-domains-using-hittest/m-p/1098468#M74676</link>
    <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I aim using hitTest to get values of features that i have on my map and show them in my HTML&amp;nbsp; table i do it so:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;graphic.attributes.qselis_kategoria; &lt;/STRONG&gt;After this i try to add name, values, alias but nothing works. How can i get values of domains? Help&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Sep 2021 14:37:24 GMT</pubDate>
    <dc:creator>Vakhtang_Zubiashvili</dc:creator>
    <dc:date>2021-09-15T14:37:24Z</dc:date>
    <item>
      <title>Values of domains using hitTest</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/values-of-domains-using-hittest/m-p/1098468#M74676</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I aim using hitTest to get values of features that i have on my map and show them in my HTML&amp;nbsp; table i do it so:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;graphic.attributes.qselis_kategoria; &lt;/STRONG&gt;After this i try to add name, values, alias but nothing works. How can i get values of domains? Help&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Sep 2021 14:37:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/values-of-domains-using-hittest/m-p/1098468#M74676</guid>
      <dc:creator>Vakhtang_Zubiashvili</dc:creator>
      <dc:date>2021-09-15T14:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Values of domains using hitTest</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/values-of-domains-using-hittest/m-p/1098536#M74679</link>
      <description>&lt;P&gt;There are few a steps to something like this.&lt;/P&gt;&lt;P&gt;The layer has a fields property&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#fields&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Looking at the field, it has a domain property&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Domain could be range or codedValue type&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#domain" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#domain&lt;/A&gt;&lt;/P&gt;&lt;P&gt;CodedValue has a method called getName that I think will do what you are looking for.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html#getName" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-CodedValueDomain.html#getName&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Which could end up looking like this.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const field = layer.fields.find((field) =&amp;gt; field.name === FIELD_NAME);
const domain = field.domain;
const domainValue = field.getName(attributes[FIELD_NAME]);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think, I haven't had to do something like this in a while, but that should get you on the right track.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 16:16:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/values-of-domains-using-hittest/m-p/1098536#M74679</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-09-15T16:16:10Z</dc:date>
    </item>
  </channel>
</rss>

