I am trying to use ArcGIS Online and Survey123 to create an inspection form that works against an existing feature. For example; I have a bunch of construction site points that I need to conduct various inspection on. I am having trouble getting some of the fields to auto populate in survey123 from the existing feature (Project Name, Project Type, Permittee, etc). If someone could point me in the right direction I would be very appreciative. I have attached a copy of my spreadsheet. Thanks.
I assume you mean pulling from Collector? If so your URL should look like this where the {} are from Collector and the others are the name of the field in Survey123 so Survey123field = {CollectorField}
arcgis-survey123://?itemID={FormIDHere}&field:Office={Office}&field:PlotID={PlotID}&field:PlotKey={PlotKey}&field:GapData={GapData}
See page 7 of this post for more
https://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-scheme?messageTarget=all&start=150&mode=comments
https://community.esri.com/groups/survey123/blog/2016/07/30/understanding-survey123s-custom-url-scheme
This blog post is my cheat sheet to passing values from a point/polygon in collector (Arc Online) to Survey123 fields
Also see this post if any of the fields you're trying to pass have a domain (Collector will pass the description in the URL and not the coded value), which makes things a bit difficult.
https://community.esri.com/thread/213202-question-about-spaces-in-survey123-connect-name-fields-of-choices
To make this easier (and to not have to refer to the documentation every time...) I made an Excel sheet to help me build the link to pre-populate items in Survey123. I attached a copy here, feel free to modify and use.
Thanks everybody,
I've gone through and updated my spreadsheet but now I am getting a "The custom feature service submission url is not compatible with this survey (Request Error)." I'm not really sure to go from here. Thanks again for all of your input. I've again attached a copy of my spreadsheet.
Hi Brett,
The submission URL setting is used when you are submitting to an existing feature service; you appear to have a URL to open Survey123 there.
James,
Thanks for your help. I guess I'm a little confused. I chose the existing feature option in Survey123 Connect and chose the existing feature service I was hoping to auto populate from (construction site). Do I need to create another feature service for inspections and use the submission url for the actual construction site feature service? Thanks again for your help.
Brett
If you chose the Existing Feature Service option, the submission_url should have looked something like https://www.arcgis.com/sharing/rest/content/items/0123456789abcdef0123456789abcdef when the form was first created; the first part will be different if you're using ArcGIS Enterprise; the very last part will be a different 32-character set that corresponds to the item ID of the feature service's content entry. That is the link to feature layer for submission and can't be altered. This is the first step for loading data from an existing feature service into a form for editing/revising. The second step is to enable the Inbox (see Prepare for editing existing survey data—Survey123 for ArcGIS | ArcGIS ); the Inbox functionality allows for the editing of the data in the feature service (as opposed to simply adding more information to the feature service, which is the default behavior). Note that editing existing data does not work in the same scenario as opening Survey123 via Collector (using the application-specific arcgis-survey123:// URL)
Do you have any kind of Excel or CSV file which shows relationship between Construction Site vs Project Name, Project Type and Permitee Etc.. so that you can upload CSV to Survey123 and use Pulldata() function. You can change appearance for the fields you want to AUTOCOMPLETE
I think I figured it out. I was unsure where to copy the custom url that allowed me auto populate. I ended up attaching the custom url to a feature service pop up. Not sure if that is the best method but it worked for me. Thanks.
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-scheme 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.
You can built a form right from a feature service.
Of course, I have uploaded the survey to an existing service. But that's not my problem -the issue was how to pass data already in some fields into the survey form to avoid redundant typing, and how to integrate the survey with Collector which shows you the specific polygons that are being added with attribute data. Very clumsy solution, but it works. ESRI needs to streamline this.
Also, once in the survey there seems to be no easy way of going back to Collector unless one hits the back button repeatedly. But I have now also built a call back code in the popup to speed that up a bit. Still not ideal if you're dealing with hundreds of polygon edits/survey adds in a day.
Hello - thanks for sharing. I had the very similar situation but it seems to always create a new record instead of editing the existing record? Or do I miss anything?
thanks,
Yuying
Hi Yuying,
Currently, the field app only supports creating a new feature when opened via a URL, not editing an existing feature.
Hi James,
I'm doing something similar as well but I have a different problem. My field populates without a problem: https://www.arcgis.com/home/webmap/viewer.html?webmap=ca0283d91fda4aabbdae420151f2a64b&extent=-84.7734,30.2017,-83.7592,30.7084 but upon submit I get the following error (attached). When I press to navigate to the errors nothing happens.
I think I figured out my problem. I changed the link to open in the native app and it worked perfectly. Unfortunately, for this project I have to use the web version of Survey 123.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.