Adding related feature to a hosted feature layer

176
5
10-15-2020 05:51 AM
New Contributor III

Hi everyone,

another great day to ask questions! I published a survey123 form and I'd like to use an URL Collector to create polygons and lines for few groups in the form. First, I was wondering how can you link features you do in Collector with the questions (table or row)  in the Survey? For using Collector, I created a feature service and a webmap but realized there would be no relation between both. As shown in this demo : https://geomarvel.com/collector-integration-with-survey123/ , they finally just put features in the same folder for the same project. Actually, my database will stock more than one project.

By now my idea was to add related feature with relationship class to the hosted feature layer BUT can we do this? I know I could export the form in FGDB to arcmap, add the relationship and publish back but I think I would loose all the settings made like appearance and calculation.

Any idea how to relate features in Collector to questions in Survey?

Thanks guys

Reply
0 Kudos
5 Replies
MVP Frequent Contributor

I do this between 9 forms and a main point. 

See this post   https://community.esri.com/thread/221263-mapping-with-survey123-within-a-polygon-or-admin-unit 

It does take some setup but works great.  Hope it helps.

New Contributor III

Looks like exactly what I wanna do but don't you lose all your settings in Survey123 when you download it and bring it back to Connect using the published service? Also, I get some real issues as well using the feature layer that survey creates in ArcGIS Collector... The map won't load as I get errors about duplicate domains. Of course I use the same domains for different questions!

Reply
0 Kudos
MVP Frequent Contributor

No the form is one item and the hosted feature service is another item.  You repoint the form to the new hosted feature service but the form is the same.

I use the same lists lots of times in a form with no issue.  If you mean across forms I do that also. You could name them differently in the forms however.  So make them FormNameItemList instead of just ItemList.

Sorry not sure what the issue is I have no seen this issue.

New Contributor III

I think my main problem is I don't get how to relate the form with a feature service published in Arcmap instead of Survey Connect... When you say "repoint" you're talking about the submission URL right? Never set that up before... Which URL do I need to copy/paste there? I've had a look at the post you you shared but Its still  a bit confusing to me.

Thanks again

Reply
0 Kudos
MVP Frequent Contributor

Yes you are just repointing where 123 will send the data.  Imagine sending a letter to someone.  If you find out they have a new address the letter does not change just the envelope.

For the URL you use the Item ID of the new hosted feature service

(note take out the - I had to add it or it will make it a link)

First part h-ttps://www.arcgis.com/sharing/rest/content/items/

+ Item ID 

fa5a72f8335047e4bf00b230fc1cd329

Gives you

h-ttps://www.arcgis.com/sharing/rest/content/items/fa5a72f8335047e4bf00b230fc1cd329

Hope that helps.