<?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 Arcade data expression to retrieve Z values in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-to-retrieve-z-values/m-p/1128532#M5542</link>
    <description>&lt;P&gt;Hi all. I'm trying to use a data expression to retrieve a table that can use to create an elevation profile (capture date on X axis and Elevation on the Y axis) in a serial chart. ArcGIS Dashboards on Enterprise Portal&amp;nbsp;10.9.1&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can successfully retrieve X and Y values using&amp;nbsp;geometry(feature).x and&amp;nbsp;geometry(feature).y, yet&amp;nbsp;geometry(feature).z just returns blank values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is accessing the Z geometry supported in Dashboards?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The source features are from Collector and when I look at the feature service description it has&amp;nbsp;&lt;STRONG&gt;HasZ: true&lt;/STRONG&gt;. I've also exported this data to Pro and can successfully add X Y and Z coordinate fields so I know that the Z values are present in the data.&lt;/P&gt;&lt;P&gt;My poor code snippet below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs =FeatureSetByPortalItem(Portal('https://xxxxx/portal'), '0116ef7ee89c4de0829fe554315e2177', 0)


var dowDict = {
'fields': [{ 'name': 'dow_num', 'type': 'esriFieldTypeInteger'},
{'name': 'elevation', 'type': 'esriFieldTypeString'},
{'name': 'militaryhr', 'type': 'esriFieldTypeString'},
{'name': 'species', 'type': 'esriFieldTypeString'}],
'geometryType': '',
'features': []
};

var index = 0;

for (var feature in fs) {
dowDict.features[index] = {
'attributes': {
'dow_num': Hour(feature['creation_date']),
'elevation': text(geometry(feature).x),
'militaryhr': Text(feature['creation_date'], 'HH'),
'species': feature['species_common_name']
}}
index++;}

// Convert dictionary to feature set.
var fs_dict = FeatureSet(Text(dowDict));

// Return case data by day of Hour
return fs_dict;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Dec 2021 03:46:40 GMT</pubDate>
    <dc:creator>ChrisH2</dc:creator>
    <dc:date>2021-12-30T03:46:40Z</dc:date>
    <item>
      <title>Arcade data expression to retrieve Z values</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-to-retrieve-z-values/m-p/1128532#M5542</link>
      <description>&lt;P&gt;Hi all. I'm trying to use a data expression to retrieve a table that can use to create an elevation profile (capture date on X axis and Elevation on the Y axis) in a serial chart. ArcGIS Dashboards on Enterprise Portal&amp;nbsp;10.9.1&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can successfully retrieve X and Y values using&amp;nbsp;geometry(feature).x and&amp;nbsp;geometry(feature).y, yet&amp;nbsp;geometry(feature).z just returns blank values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is accessing the Z geometry supported in Dashboards?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The source features are from Collector and when I look at the feature service description it has&amp;nbsp;&lt;STRONG&gt;HasZ: true&lt;/STRONG&gt;. I've also exported this data to Pro and can successfully add X Y and Z coordinate fields so I know that the Z values are present in the data.&lt;/P&gt;&lt;P&gt;My poor code snippet below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs =FeatureSetByPortalItem(Portal('https://xxxxx/portal'), '0116ef7ee89c4de0829fe554315e2177', 0)


var dowDict = {
'fields': [{ 'name': 'dow_num', 'type': 'esriFieldTypeInteger'},
{'name': 'elevation', 'type': 'esriFieldTypeString'},
{'name': 'militaryhr', 'type': 'esriFieldTypeString'},
{'name': 'species', 'type': 'esriFieldTypeString'}],
'geometryType': '',
'features': []
};

var index = 0;

for (var feature in fs) {
dowDict.features[index] = {
'attributes': {
'dow_num': Hour(feature['creation_date']),
'elevation': text(geometry(feature).x),
'militaryhr': Text(feature['creation_date'], 'HH'),
'species': feature['species_common_name']
}}
index++;}

// Convert dictionary to feature set.
var fs_dict = FeatureSet(Text(dowDict));

// Return case data by day of Hour
return fs_dict;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Dec 2021 03:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expression-to-retrieve-z-values/m-p/1128532#M5542</guid>
      <dc:creator>ChrisH2</dc:creator>
      <dc:date>2021-12-30T03:46:40Z</dc:date>
    </item>
  </channel>
</rss>

