launch fieldmap from survey123 to capture spatial data

210
4
2 weeks ago
SebDLC
by
New Contributor

Hi everyone, 

My company has recently made the move to Esri. I am a regular user of ArcPro and programmer but I don't know much about the field apps. I have been put in charge of creating a workflow from data collection & mapping to data export.

We were previously using fulcrum to collect data which was primarily form based like survey123. Considering the benefits of both survey123 (complex form needed for some type of surveys) and Fieldmap (needed for geofencing, team work, project maps, etc), I'd like to find a workflow that works with both. Note that some surveys that we will be doing can be quite complex and contain a few repeats, some will also use QR codes. Users also must have the ability to be able to work offline if required. Most of the time, there will be no pre-entered features available and they will need to create those features. Future users re-visiting a feature (such as equipment) should also be able to update the data.

As complex as it may sound, the idea is to try to keep it very simple for staff and avoid having them to jump between different workflows depending on the survey type (for instance, survey123 for koala surveys and equipment only in Fieldmap. It would create too much confusion and I can already foresee lots of errors). 

I came up with two workflows so far but I am open to suggestions: 

1. field staff opens project map in Fieldmap and create a point for feature layer. I used field calculations using Arcade to automate some of the entries. The user then submits the point and clicks on the survey123 link to continue the survey. They submit their data in survey123 and they are taken back to the project map and the fields have been updated with whatever was submitted in survey123. It works but it is a bit fiddly and slow. I have not tried it offline though. I also fear that we will end up with missing survey123 data. 

2. Inspired from this video (https://www.youtube.com/watch?v=gjBNJ-E21MY). Field staff opens survey123. They fill in the form and at some point I added a note with a link to Fieldmap for them to capture spatial information (e.g. point, polygon). They are then taken back to survey123 to submit their record. However it currently creates two points (one from fieldmap and one from survey123 with the data). It does not do at all like in the video. I used the following URL in survey123 but I feel like I am missing a point for the information not to pass onto the created point in fieldmap. 

<a href= "https://fieldmaps.arcgis.app?itemID=93cbf3d1aff240a9a5a9314a35530739&referenceContext=addFeature&fea..., %22sat_name%22:%22${sat_name}%22, %22tree_sp%22:%22${tree_sp}%22, %22dbh_10%22:%22${dbh_10}%22, %22scat%22:%22${scat}%22, %22notes%22:%22${notes}%227D&callback=arcgis-survey123://">Open Field Maps</a>

 

Happy to clarify anything if need be or to provide more information. Any help will be really appreciated. 

Thanks, 

Seb 

 

0 Kudos
4 Replies
DougBrowning
MVP Esteemed Contributor

I use this workflow a lot.  It will always be two sets of geometry since you are creating both at the same time in two different apps.  What I do is have the two related together using a relationship class.  In your case if they can add lines, polygons, or points you would have 3 geometry layers related to the form so the user can mix and match what type of geometry to add.  You would need 3 different URLs.  You would pass over the relationship key in the URL so they relate together.  This looks like what the video is showing they just do not show you the point.  We actually use this as a QA measure as sometimes users draw in a polygon far from where they filled out the form.

When you are offline Field Maps will not be able to see the 123 data until they get back online and sync.  There is no way for the apps to share data until it all syncs to the cloud.  This is due to app security rules. 

My write up in this post may help https://community.esri.com/t5/arcgis-survey123-questions/mapping-with-survey123-within-a-polygon-or-...   It works really slick once you get it.

Not sure I am explaining it well but both apps have to dump their data into a bucket on AGOL.  If Field Maps added data and then 123 added to the same bucket then it would overwrite it.

Like you I do this because Field Maps is better at the spatial side and taking maps offline and 123 is better at the forms.  123 can do polygons but you need to sideload a basemap to use offline which is hard if crews cover large areas.  

Make sense?

0 Kudos
SebDLC
by
New Contributor

Hi Doug, 

Thank for your reply, it is really helpful. 

I followed the steps from your previous steps. Here is my set-up: 

This is my survey123 Form linked to the hosted feature layer with the relationship class. I have two point layers (let's call them A & B to simplify) related to the record_id field which is calculated in the survey123 form based on date, staff name, project number etc. The submission URL in the setting links to layer B. Layer A has one field record_id and the relationship class. 

SebDLC_0-1715317149092.png

The URL in blue is as follow and links to layer A to create features: 

<a href= "https://fieldmaps.arcgis.app?itemID=ac0b4199f4714d968e39c0e6a84d776f&referenceContext=addFeature&fea...">Open Field Maps</a>

 

However, I have the following errors: 

1) When I click on the link from survey123, the map opens in fieldmap but I cannot create anything for layer A only for layer B. I tried linking to layer B but then layer A that is supposed to be the bucket for the fieldmap geopoint is useless. 

2) Ideally, I want to achieve the same thing that you described and, in the video, so when I open fieldmap I can see that the data that I entered in survey123 (but yet to be submitted) is pass onto fieldmap. I think my URL is wrong. I tried to add feature attributes like in my first attempt (see original post) but it does not work.

3) Do I also need to create more fields in layer A to match layer B? I thought it was not necessary considering the relationship class. 

 

I reckon I must be doing something wrong with the url above, what do you think?

Let me know if you need me to provide you with more info. 

Cheers, 

Seb

0 Kudos
DougBrowning
MVP Esteemed Contributor

Trying to follow this part  "so when I open fieldmap I can see that the data that I entered in survey123 (but yet to be submitted) is pass onto fieldmap".  If you have not submitted a form yet how would the data be in Field Maps?  Or do you mean just sending some fields?  If so you have no fields in your URL. See below.

Is the form or the field maps geo the parent?  Field Maps stops you from making a child without a parent by default but can be turned off in settings.  In this case those I would usually make the geometry the parent.  You would pass the relationship key over to Field Maps in the URL, Draw shape, Submit, it flips back to 123, submit.  Then sync, then you will see both in Field Maps as a parent and child record.  Until you sync then there is no 123 data in the service yet.  

In the URL you posted I do not see you sending any fields over.  Here is a sample URL I have in my forms to add geo to Field Maps

<a href="https://fieldmaps.arcgis.app?itemID=a90b10bbfb55334d&referenceContext=addFeature&featureSourceURL=ht...">Add a Line to Field Maps</a>

My callback uses http and honestly I cannot remember why you think it would be the app style link but it works.

Hope that makes more sense.

0 Kudos
abureaux
MVP Regular Contributor

I have a similar need coming up, so I am marking this for future reference 😆

0 Kudos