AnsweredAssumed Answered

Collector (Aurora) Custom Expressions in Custom URL Scheme Error

Question asked by wcarver_usfs on Apr 11, 2019
Latest reply on Apr 12, 2019 by mbockenhauer-esristaff

I am writing a campsite collection form that uses Collector and Survey 123. I set this up using Arcmap's custom URL scheme. The user can select a site in collector and two links are included in the pop-up. One says Resurvey Campsite the other says Survey New Site. The resurvey link has a rather lengthy URL that attempts to pre-fill many of the fields of survey123. This worked other than the attributes that I had custom expressions to set correctly. The final bit the resurvey link sends the coordinates of the campsite using another custom expression.


Unfortunately, the custom expressions would work on my desktop, but when I opened collector on the iPad issued to me, they would not. I posted on this issue and was informed that Collector Aurora would support custom expressions in the URL link. I signed up for the beta and had fair success with the iPad. Some custom expressions still didn't send but coordinates did, and they were the most important one to work.


Now that Collector (Aurora) is officially out, I went out and field tested the two apps to discover that custom expressions are once again not working on my iPad or Samsung Galaxy phone. I am curious is this is a known issue and can be fixed or not, as it is rather pivotal that I can at least send the coordinates of the point to Survey 123. Below is my custom URL scheme for the resurvey link and the steps I went through to test if the custom URL was truly the issue


Resurvey Campsite Link - (&center={expression/expr2} is the non-functioning part)


Resurvey Campsite Link Output on Desktop



Expression/expr2 - Code to calculate geometry

function metersToLatLon(mx, my) {

   var originShift = 2.0 * PI * 6378137.0 / 2.0;

   var lon = (mx / originShift) * 180.0;

   var lat = (my / originShift) * 180.0;

   lat = 180.0 / PI * (2.0 * Atan(Exp(lat * PI / 180.0)) - PI / 2.0);

return [lat, lon];


var poly = Geometry($feature);

var result = '';

if (!IsEmpty(poly)) {

   var latlon = metersToLatLon(poly.x, poly.y);

   result = Round(latlon[0], 6) + ', ' + Round(latlon[1], 6);


return result;

Process for Testing Error

  • After noticing the error in the field, I retested each device in the office

     Desktop (Success)                          iPad (Error) - Newest Collector App             Android (Error) - Beta App

  • I then created a third link that only included the code to send the coordinates and tested it on each device

    Link - arcgis-survey123://?itemID=1284e4815d4c4995b5809f1a51a83f9f&center={expression/expr2}

    Desktop (Success)                       iPad (Error) - Newest Collector App             Android (Error) - Beta App

  • Finally, I created one more link that sent a fixed coordinates instead of using the custom expression

Link - arcgis-survey123://?itemID=1284e4815d4c4995b5809f1a51a83f9f&center=34.734837%2C%20-83.916739

     Desktop (Success)                       iPad (Success) - Newest Collector App             Android (Success) - Beta App


Thank you for anyone who has made it this far, I would really appreciate any help on resolving this bug as I'm super excited about using Collector and Survey 123. Good work!