Capturing User’s Location at Related Table Record Creation in ArcGIS Field Maps

338
12
2 weeks ago
DhowalDalal_EsriUK
New Contributor II

In ArcGIS Field Maps, is there a way to log the current location of a mobile device when a record is added to a related inspection table ? The goal is not to track the asset’s current geometry, but rather to verify the user’s location at the time of record creation. This would serve as proof that the user was indeed at the specified location.

12 Replies
KerriRasmussen
Esri Contributor

Hi @DhowalDalal_EsriUK . Yes, you can collect the current geometry using the Arcade function Geometry() on your field. For your X field, you would add this expression: 

Round(Geometry($feature).X, 6)

Then do the same for your Y field, switching the X for a Y in the expression. The example here is rounding your X coordinate to 6 places, you can change that 6 to another number to fit your needs. 

0 Kudos
DhowalDalal_EsriUK
New Contributor II

Thanks for the reply @KerriRasmussen - just to check i`ve understood the steps correctly

1 - Create two new fields in the related table to capture X and Y 

2 - Calculate geometry using Arcade expression above.

Question - will this use the GPS location from the device? Thanks. 

KerriRasmussen
Esri Contributor

@DhowalDalal_EsriUK  Yes, you are correct, create the fields then add the Arcade expressions to those fields to calculate the geometry.

Yes, it will use the GPS location of the device. 

0 Kudos
DhowalDalal_EsriUK
New Contributor II

Thanks @KerriRasmussen - we are going to test this. Will report back. 

ShaunGibbins
New Contributor III

@KerriRasmussen 

Isn't the Geometry($feature) function just going to return the geometry of a feature?

The scenario I have is, I have a point feature layer that contains assets, I have a related inspection table that users complete when carrying out cyclical operation to the asset, I already have arcade expressions in attribute rules that copies the x and y to fields on my inspection table so that we have a record of the location of the assets when it was inspected.

What we want to add to this is a method of recording the current location of the user when they are creating an inspection record to prove that they were on site at the time that the inspection was recorded. So some way of grabing the mobile device's current GPS coordinates when the inspection record is created.

We did have a suggestion to make the inspection table a point feature class and use GPS metadata to capture the user 
location but I don't see how you could force GPS location and prevent the user manually setting the location of this point layer.

0 Kudos
KerriRasmussen
Esri Contributor

@ShaunGibbins It depends on how you use the geometry function. The example I used above will take the geometry of the point and return the X value for that point. 

You can collect the lat/long using the geometry function, but there is also another option. @DhowalDalal_EsriUK this option may also work for you as well.

In Field Maps Designer, if you go into the  app settings for your form, select Collection and scroll down to Manual location. There is an option to block manual location, meaning that when the user is entering a point, it will automatically use their GPS location and will not allow the user to manually change their location. One note I should make here is that this is for collecting a point, not for collecting in a related table. 

ShaunGibbins
New Contributor III

Hi Kerri

Dhowal was posting on our behalf so it's my problem he is trying to find a solution for. 

If I change my inspection table to a point feature class and block manual location then this would indeed provide a solution to the dilemma. 

Is this setting available in enterprise and if so what version as I am not seeing the option in our 10.8.1 environment. 

ShaunGibbins_0-1714655971546.png

 

0 Kudos
KerriRasmussen
Esri Contributor

Hi @ShaunGibbins . Yes, the settings are available in Enterprise at 11.2. So in that case, you may need to use Arcade for now. 

ShaunGibbins
New Contributor III

Thanks @KerriRasmussen 
We are on an upgrade path to 11.x but have been delayed due to the corrupt security patch, we are in the process of attempting the repair this weekend. 

For now though I still don't quite understand how I use arcade to grab gps coordinates, I can only find a function that pulls the x or y from a feature.  The feature can be manually located so I am after the GPS location of the mobile device at the time the record is created as opposed to a location the user can manipulate. 

 

0 Kudos