Select to view content in your preferred language

Elevation Arcade Expressions no longer working

3495
20
Jump to solution
03-06-2026 06:03 AM
Labels (3)
fjramos
Frequent Contributor

Good morning,

I recently noticed that some elevation expressions I put on one of my hosted feature layers is no longer working properly. The expression is "Round(Geometry($feature).Z, 2)" & "Round(Geometry($feature).Z*3.28084, 2)". I found that expression online through one of the ESRI sites. It used to show in meters so i created a second one that multiplies the value by 3.28084 to convert it to feet. It worked great for a long time, but just a couple days ago the values popped up as "--" on Field Maps. Later that afternoon I checked AGOL and the values that were showing up as "--" on Field Maps are showing up as "748,417.04" six or seven digit values. The previously collected data also shows up in the same manner. I also  noticed that it happened after updating Field Maps, but whatever happened somehow affected AGOL pop-ups too. Any idea what could've caused this? Thanks

 

0 Kudos
1 Solution

Accepted Solutions
fjramos
Frequent Contributor

Okay so I just figured it out. I set the base map back to an ESRI imagery base map to test it and the expressions are no longer in 6 digit format and displaying correctly on AGOL Web Viewer now (see screenshots below). So I'm guessing something got fixed/modified in the background that has to do with base map configurations.

My initial idea of using our web service URL as a base map was to keep everything consistent to our local datum. It worked great up until now that I noticed this change.

Something else got fixed that was a insignificant issue that I pretty much ignored, and never asked about on the forums, that I'll share. When I first added those Z expressions, they would display backwards on AGOL Map Viewer for some reason. The MSL(ft) conversion expression would show up as meters and the MSL(m) expression would show up in ft on the AGOL Map Viewer pop ups. However, it wasn't too much of a big deal because on Field Maps the ft values displayed on the correct MSL(ft) field and meter values on the MSL(m) field, which was more important to me being able to see the elevations in real time in the field. When I would get back to the office and briefly review the elevations on AGOL Map Viewer, I knew the ft elevations were on my MSL(m) expressions and not the MSL(ft), that's why I left both MSL(m) and MSL(ft) fields on the pop-up.

Like I said, it wasn't too big a deal because my priorities was to be able to see the Z values in the field, then if I had to process the data to create a map, I would export the features into a shapefile and process the data in ArcMap. We are migrating to ArcGIS Pro soon, so that'll be a whole knew experience when it comes.

View solution in original post

0 Kudos
20 Replies
tikola
by Esri Contributor
Esri Contributor

Good evening

Known issue and I have been strugling with same one. The Z is the issue so if you do same function with X or Y it works but Z fails. Also if you do this same function in ArcGIS Pro it works and most likely also in Classic Map Viewer but not in current AGOL Map viewer. Of course as Classic viewer does not exist it is no option but that was a case while it existed it worked there. 

This is the variant where I worked the case out:

https://community.esri.com/t5/arcgis-online-questions/arcade-labels-work-in-map-viewer-classic-but-n... 

My case was related in labeling so function might work in other Arcade needs also in AGOL but in labeling it has an issue. My solution is now that I label Height from attributes but I also have in future some needs to show geometry based height values so I have exact same need to get fixed. So contact your local Esri support and push the case through them. With this information you should have enough input for support story.

fjramos
Frequent Contributor

Interesting,

I did notice a couple years ago that I wasn't able to label those expressions I mentioned above, it wasn't too big of a deal for me since I would go back to the office, process the data and create/label a map from there. Seeing them on the attribute list/pop-up was good enough for me just to confirm my elevations in real time. The expression worked great this way for years, but just a couple days ago with the recent Field Maps update, the expression does not display Z values, nor X & Y values on Field Maps anymore. I can see X & Y value expressions on AGOL Map viewer, but the Z value expression is way off, it's showing Z values in 6 digit integers.

0 Kudos
tikola
by Esri Contributor
Esri Contributor

My variant can be seen on this map: https://arcg.is/1110Du 

Open that in browser and check Z in label - and then open exactly same map with ArcGIS Pro and check Z value in label and you should see the difference. I have not thought the issue in Field Maps perspective as my need was related on AGOL sewer upelev and downelev visualization according pipe flowing (=digitizing) direction. There actually just finding correct X value is enough in my script.

It can be that autumn major Field Maps update changed the FieldMaps visualization engine closer to new AGOL MapViewer and we got the same issue there with that update.. 

 

tikola
by Esri Contributor
Esri Contributor

Based on your post I got inspired to test my case in Field Maps - there is no issue. So my variant is such that it fails only in AGOL but in all other places in Esri ecosystem it works without issues. So it might be that our versions are slightly different but most likely we are still seeing the variations of the same issue.

fjramos
Frequent Contributor

Are your values "0"? because they're showing up as 0 when I open the map.

0 Kudos
ColinLawrence
Esri Regular Contributor

Hey @fjramos  thanks for posting about this. I have some existing expressions that calculate Z values and they are working for me. I also copied what you have above and they seem to be working for me as well in both Field Maps and Map Viewer. Could you provide some additional details? For example, what is the coordinate system (horizontal and vertical) on this feature service? Are you using a correction service with your Trimble? Do you reproduce this just using the internal GPS on the device? Is the map you see this in editable or are you reviewing existing data in a read only map? Thanks again!

Regards,
Colin
fjramos
Frequent Contributor

Thanks Colin, that's interesting. I am on NAD83 South Texas Plane 4205 coordinate system and GEOID18. The real time corrections is a local RTK service from our State Transportation Department TXDOT. The antenna is a Trimble R2 cm unit. I have not attempted to reproduce with internal GPS, however a coworker collected some points earlier with a Bad Elf Extreme cm antenna unit and the results identical, showing Z values in 6 digits (74xxxx.00) The map is editable, as it is the map we use on a daily basis to collect data.

I will also add something I noticed, but can't confirm cause I can't remember if this is how it happened. I remember noticing the expression attributes as "--" first on my mobile work phone. I use Field Maps simultaneously on my mobile work phone (Android) and on my Trimble TDC600 paired with R2. I think I had just done a full app update on my Trimble TDC600 unit that included Field Maps, when I first noticed the expressions "--" after collecting a point. When I noticed that discrepancy, I checked the expression fields on my mobile work phone, which did not have Field Maps updated yet and I could've sworn that on previous points the expression elevation data was correct, with the exception of that recent point collected on the TDC600 unit. I later updated Field Maps on my mobile work phone and now all points with the expression show up as "--". Not sure if that has anything to do with it, but it was an observation I made, leading up to it.

We are still in the process of migrating into ArcGIS Pro, so we are still using ArcMap. I exported my points to ArcMap to process and get the Z values. Fortunately, the elevation data is correct when processed through ArcMap. The only issue is that it does not display correctly on AGOL or Field Maps. Let me know if you need anymore information, thank you for your time.

Regards,

Frank

0 Kudos
fjramos
Frequent Contributor

Hi Colin,

Disregard my previous message, the Field Maps side is now working properly. However, on AGOL, the expression is still showing up as 6 digit (74xxxx.00) values. That's not a big deal, since we export the layers into shapefiles, then process/label them outside of AGOL. Thanks!

0 Kudos
ColinLawrence
Esri Regular Contributor

Odd, did you make any changes to the map? I also tried this out with a Trimble R1 and the expressions are working correctly. I also see the expected formatting in Map Viewer. 

Regards,
Colin