Hi all. I am having a similar issue. I created a survey using an existing feature service in AGOL through Survey123 Connect. The feature service has polygons (agricultural tracts) and fields that describe various attributes. That process went fine and the survey looks great. Using these instructions (Uhttps://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-sche... I added a custom attribute display url to the layer in AGOL to call up the survey form in Collector. Because I want the survey form to have the area and tract ID prepopulated I added the relevant fields too:
arcgis-survey123://?itemID=69c04a817b534bddb2eeef3d0f7c2832&field:Tract area={Area__m2_}&field:Tract ID={Code}
Basically I'd like to see this behavior: user goes to Collector, clicks on a polygon in the tract layer, and the link to the survey opens up with the name of that specific tract showing in the tract ID field of the survey and its area prepopulated. What am I doing wrong? While the survey is correctly linked in the Collector app when I edit the layer, the fields do not prepopulate. I did a test data entry and the survey simply creates a new entry.
I have enabled inbox btw.
Thanks!
UPDATE: okay, figured it out. So for those poor bastards who are doing this from scratch (like me), if you have an existing AGOL layer you want to connect to a new survey, here are the steps:
1. Make sure the layer is properly shared with the same group as the survey. Make sure your fields are finalized before the next step. Make sure the layer has sync and full edit abilities selected (and attachments enabled if you plan to have an attachment field in the survey). (If you enable the attachments first then do allow the edit/sync you may have to disable the attachments and enable again for some reason).
2. Create the survey (best to do this in Survey123 Connect). Make sure the survey uses exactly the same names and types of ESRI data as the layer on AGOL (check the schema in Survey123 Connect to be sure).
3. Publish the survey to the existing feature layer. This can be updated after you publish it from Survey123 Connect (make the needed changes and republish to the same layer).
4. Next, go to AGOL and open the map that contains the feature layer. From Content, highlight the layer in question and select Configure popups.
5. Select Custom Attribute Display. Click on the green Configure button and select the link icon.
6. Go to survey123.arcgis.com and select the by now published survey. Select Collaborate in the green ribbon, then from Link below select Open the survey directly in the app. Click that link next to the sentence (Learn more about this option) and copy survey link e.g. arcgis-survey123://?itemID=69c04a817b534bddb2eeef3d0f7c2832
7. Go back to AGOL and the Custom Attribute Display interface. In the URL field add the link above.
8. If you want some fields prepopulated from the AGOL layer, add the relevant fields with ampersands right after the survey link. E.g. arcgis-survey123://?itemID=69c04a817b534bddb2eeef3d0f7c2832&field:Tracts={Tracts}&field:Area={Area}&field:Code={Code}
Note that in the formula above the field names without brackets must correspond exactly (including any capitalization) with the survey field names where the information is to be autofilled and the field names with brackets must correspond exactly with the fields of the AGOL layer from where the autocomplete data is to be pulled.
I still can't stand how complicated all of this needs to be. ESRI, come on! This is key functionality, it shouldn't be this obscure to figure out. How about some better documentation? How about a push option to connect to an AGOL layer straight from the Survey123 app? Been a long, long day.