Survey123 link to Collector: initiate feature collection (offline)

1223
4
04-28-2020 12:04 PM
BradMead
New Contributor III

I am currently trying to set up a workflow for an android device where field workers will collect data in Survey123 form that links to a feature service within a map in Collector (Aurora).  The link will open up an offline map, where field workers will then collect polygon features that are linked to the survey123 data by a unique GUID (TableToPoly_ID).  

I have the link setup up in note field in Survey123 as:

<a href="arcgis-collector://?itemID=4371615d717944a8be14168b0874a4cb&referenceContext=addFeature&featureSourceURL=https://services7.arcgis.com/QYFwahcGngGOX9ic/arcgis/rest/services/Treatment_polygon/FeatureServer/0&featureAttributes=%7B%22WDSA_ID%22:%22${TableToPoly_ID}%22%7D"><b><font size=6><font color=#6a2031><center>Collect Treatment Area</center></font></b></a>

I have tested the link on iOS devices and it has functioned as desired (opening the offline map in Collector, initiating feature collection, passing parameters).  The setup has also been successfully tested on an android device with an online map, but has been unsuccessful on an offline map.  The link opens the offline map in Collector, but will not initiate feature collection.  Is there a reason why this setup would work for certain scenarios, but not all?

0 Kudos
4 Replies
ColinLawrence
Esri Regular Contributor

Hi Brad,

This workflow should work. Can you share the device you are using and the version of Collector (assuming its 20.1 and not the beta version)? Also, I would suggest using the universal app link format moving prefix forward ie:

https://collector.arcgis.app/?itemID=....

You can try the formatting above but I doubt it makes a difference for this scenario. Is the GUID value the only attribute you are passing?

Regards,

Colin

Regards,
Colin
0 Kudos
ColinLawrence
Esri Regular Contributor

I can reproduce this problem; addFeature is never popping. We are looking into what the problem is. It is isolated to offline maps. Thanks for reporting this. 

Regards,

Colin

Regards,
Colin
0 Kudos
KyleHarper
New Contributor

I just opened a support ticket for this same exact issue - I tested on an older Android 5.1 LG G-pad 8" tablet, running Collector 20.1.0 build 2913. I experienced the same results noted above; addFeature never fires when offline area is downloaded. It works fine for me when the map is online.

We have field crews working in remote areas that are having to manually copy-paste feature IDs between apps due to this issue (which doesn't work out so well) - if you could prioritize resolving it for next release that would be much appreciated!

I reverted to Collector Classic to try it out there, and it works OK... we experienced some intermittent crashing that precluded us from having our users fall back to Classic, but it still might be a workaround for some folks. Here's what I found:

  • The addFeature fires reliably when the map is offline in Classic, and passes the featureAttributes properly.
  • Classic is prone to intermittent crashing when multiple featureAttributes are specified - this happened for me online and offline, but was more frequent when the map was online. Passing a single attribute (such as a unique ID) was much less likely to crash than when multiple attributes were passed through in the query string. I thought it was due to my older device, but other users with newer Androids confirmed they also experience the intermittent app crashing when trying the addFeature workflow in Classic.
  • When online in Classic, if there are layers that are slow to load it appears there are race conditions that cause the addFeature to never fire - or, possibly it fires prematurely before the layer is fully loaded which then results in no pop of the addFeature window. So in these cases it appears the addFeature never fired - preloading the map in the background (or downloading offline) prevented this issue.

Thanks,

Kyle

0 Kudos
ColinLawrence
Esri Regular Contributor

Kyle, Brad,

This was a bug and we have fixed it for the next release, 20.2. Very timely as this release should be available within the next week or two. There is still some funkiness around Offline Areas. As you may know you can have multiple areas and in this scenario the link will only work to open the area listed as "current" - in other words, the last opened map. If none of the Offline Areas are the "current" the link will only open to the Offline Areas Browse screen. A link could also not work if the Offline Area was just downloaded but not opened first or when all Areas were removed but the "online" map has not been opened yet (or any other map). We hope to iron out these behaviors in a future release but the tight window did not allow it. Thanks!

Regards,

Colin

Regards,
Colin