# In QField is there a variable to retrieve the altitude: (@position\_quotageid) obtained from the vertical grid shit in use

**URL:** <https://community.qfield.org/t/in-qfield-is-there-a-variable-to-retrieve-the-altitude-position-quotageid-obtained-from-the-vertical-grid-shit-in-use/698>\
**Category:** Ask the Community\
**Tags:** gh-import\
**Created:** [14 May 2025 02:49 UTC](https://community.qfield.org/t/in-qfield-is-there-a-variable-to-retrieve-the-altitude-position-quotageid-obtained-from-the-vertical-grid-shit-in-use/698 "2025-05-14T02:49:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex018/uploads/qfield/original/1X/7d3726da0ef5099a1e135505c03d2f125d527aae.png) [@system](https://community.qfield.org/u/system)\
**Post date:** [14 May 2025 02:49 UTC](https://community.qfield.org/t/in-qfield-is-there-a-variable-to-retrieve-the-altitude-position-quotageid-obtained-from-the-vertical-grid-shit-in-use/698/1 "2025-05-14T02:49:11Z")

</div>

Hello Qfield Teams,

I can easily retrieve X and Y coordinates using the variables:  
/_x($geometry)_/ and /_Y($geometry)._/

On the other hand, I cannot retrieve the corrected altitude which is  
displayed on the Qfield coordinate tracking. If I use for the altitude Z  
the variable/_z($geometry)_/, I have a “Null” value. If I use  
/_z(position\_coordinate)_/ I have the altitude relative to the Ellipsoid  
in WGS 84.

My problem is to be able to retrieve the altitude corrected by Qfield  
and which is displayed in the field on my image.

In which variable is this displayed value stored?

And how can I assign it to fields in my form prepared on Qgis?

Cordially JD

 ![Screenshot_2](https://europe1.discourse-cdn.com/flex018/uploads/qfield/original/1X/d86b7e311f48d7d78d449a9ba1895722d2c4565b.png)  
 ![QField_attribut](https://europe1.discourse-cdn.com/flex018/uploads/qfield/original/1X/4e66fd5edb71cd8cdf998c9f78ce32622ecebf88.png)

* * *

_Imported from [GitHub discussion](https://github.com/opengisch/qfield/discussions/3990) by @Desaxo on 2023-03-01T17:49:55Z_

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex018/uploads/qfield/original/1X/7d3726da0ef5099a1e135505c03d2f125d527aae.png) [@system](https://community.qfield.org/u/system)\
**Post date:** [14 May 2025 02:49 UTC](https://community.qfield.org/t/in-qfield-is-there-a-variable-to-retrieve-the-altitude-position-quotageid-obtained-from-the-vertical-grid-shit-in-use/698/2 "2025-05-14T02:49:12Z")

</div>

This is currently doable in the following way:

- make sure your layer geometry type is of type PointZ
- snap the cursor to your current position
- use `z($geometry)` as default value

There is room for improvement so the first condition on the layer geometry type is optional and to make it available via `position_coordinate`.

* * *

_Imported from [GitHub comment](https://github.com/opengisch/QField/discussions/3990#discussioncomment-5203149) by @m-kuhn on 2023-03-04T17:17:04Z_
