Select to view content in your preferred language

Pulling of Z Value using pulldata() Not Working

1435
9
Jump to solution
01-26-2024 02:45 AM
jantolihao
Regular Contributor

Hello, everyone!

I have attached here my sample survey123 form created using version 3.19. I have a problem in pulling the z value for a geopoint type using the pulldata() function. Below screenshot is my form's settings to capture x, y, and z values. 

jantolihao_0-1706264899202.png

When I tried to capture using my mobile phone, I got the Altitude (z value) but when I click OK after selecting a location on the map, it didn't include the z value. See screenshot below.

jantolihao_1-1706265588189.png

I also followed the steps specified in this link: Working with Z values in Survey123 - Esri Community

What might be the cause of this?

I appreciate your help on this matter. Thank you.

0 Kudos
1 Solution

Accepted Solutions
abureaux
MVP Frequent Contributor

Your set-up in the original post is correct. That is how you collect z values. Assuming your device is capable of collecting a z value (e.g., a cell phone) and you are making no manual changes to the geopoint, then you should be getting z values.

Can you please elaborate on how you are collecting those z values? You made two statements originally: When I tried to capture using my mobile phone, I got the Altitude (z value) but when I click OK after selecting a location on the map, it didn't include the z value. I am confused about the "click OK" part. Where are you clicking OK?

Based on your description, I assume you are talking about the checkmark on this screen:
abureaux_4-1706714833662.png

If that is the case, then you may be modifying the geopoint, which would result in the z value not being available.

Also, you have duplication of effort with your fields. Is there a specific reason for the three decimal fields? They just seem to be linked to the calculates. I'd recommend:

  1. Remove the three decimal fields
  2. Make the three hidden fields into text
  3. If you want any of the calculates to not be visible, give them the hidden appearance (it works better than the hidden type)

Then you just pull data from the source (i.e., ${loc_elevation}).

View solution in original post

0 Kudos
9 Replies
abureaux
MVP Frequent Contributor

Manually selecting a location on the map wont include a Z value.

The only way to get one is via GPS that includes a Z-axis (like your phone, or external receiver).

0 Kudos
jantolihao
Regular Contributor

Hello, @abureaux. Thank you for this response.

Yeah, I am using my phone in selecting a location on the map and I can see the Z values together with the X and Y values (please refer to the screenshot in the original post). But the question is, how do I pull that Z value (that I can see on my phone) and bring it to the survey123 form and prepopulate my Z field just like what it does with the X and Y values?

0 Kudos
DougBrowning
MVP Esteemed Contributor

Have you tried this?

https://community.esri.com/t5/arcgis-survey123-blog/working-with-z-values-in-survey123/ba-p/895011 

 

hiddenElevationElevationpulldata("@geopoint", ${location}, "z")

esriFieldTypeDouble

abureaux
MVP Frequent Contributor

The issue in this particular case is this line (from that blog):

The elevation values, as described above, are typically provided by your own device. However, if the field user modifies the provided location by tapping on the geopoint map widget and setting a new location manually, the Z values from your device will be cleared allowing the field user to set the elevation value manually. If no manual Z is set, again Survey123 will reset to the value to zero (0).

0 Kudos
jantolihao
Regular Contributor

Hello, @abureaux. Thank you again for responding.

Yeah, that statement. In my understanding, it is for "modifying" the location on the map. That means that the z values will be cleared once you move the existing location manually. However, in my case, no modifications made since it will still be captured. I still can't figure out if I missed in the steps mentioned in the link I included in the original post.

0 Kudos
abureaux
MVP Frequent Contributor

Your set-up in the original post is correct. That is how you collect z values. Assuming your device is capable of collecting a z value (e.g., a cell phone) and you are making no manual changes to the geopoint, then you should be getting z values.

Can you please elaborate on how you are collecting those z values? You made two statements originally: When I tried to capture using my mobile phone, I got the Altitude (z value) but when I click OK after selecting a location on the map, it didn't include the z value. I am confused about the "click OK" part. Where are you clicking OK?

Based on your description, I assume you are talking about the checkmark on this screen:
abureaux_4-1706714833662.png

If that is the case, then you may be modifying the geopoint, which would result in the z value not being available.

Also, you have duplication of effort with your fields. Is there a specific reason for the three decimal fields? They just seem to be linked to the calculates. I'd recommend:

  1. Remove the three decimal fields
  2. Make the three hidden fields into text
  3. If you want any of the calculates to not be visible, give them the hidden appearance (it works better than the hidden type)

Then you just pull data from the source (i.e., ${loc_elevation}).

0 Kudos
jantolihao
Regular Contributor

Hi, @DougBrowning. Thank you for this response.

Yes, I have tried this link and followed the steps. However, I could not bring the z value to prepopulate my z field in the survey123 form. I don't know if I missed something.

0 Kudos
DougBrowning
MVP Esteemed Contributor

I bring into a integer field not the Z field of the feature service if that is what you mean.  

As posted if you manually pick a point from the map you will not get a Z.  Also none of this would work on a PC of course must be a device with a GPS.

0 Kudos
JamesSerendip1
Occasional Contributor

I know this thread is now a little old, but I was having the same issue today, and found my solution in thisblog post.  Setting the bind::esri::fieldType to esriFieldTypePointZ totally resolved the issue!  My z value suddenly appeared just fine, whereas prior I was experiencing exactly what was being described -- phone shows elevation, but Z field not populating even if I don't modify the map...  but now it works!  Thanks Doug!