Arcade data expression to retrieve Z values

12-22-2021 06:13 PM
Labels (1)
New Contributor III

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 10.9.1 

I can successfully retrieve X and Y values using geometry(feature).x and geometry(feature).y, yet geometry(feature).z just returns blank values.


Is accessing the Z geometry supported in Dashboards?


The source features are from Collector and when I look at the feature service description it has HasZ: true. 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.

My poor code snippet below:


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']

// Convert dictionary to feature set.
var fs_dict = FeatureSet(Text(dowDict));

// Return case data by day of Hour
return fs_dict;



0 Kudos
0 Replies