Select to view content in your preferred language

Mapping with Survey123 within a polygon or admin unit

24400
29
Jump to solution
09-14-2018 05:31 AM
Indra_SharanKC
Occasional Contributor

Is there a way to use ArcGIS online web map in Survey123? I need to search an administrative unit by its name from search window either on Survey123 app or on Survey123 web form, then once the admin unit flashes and zooms to its extent, i need to tap on the map within the boundary and identify a point location to fill up with its attributes data and then submit. The approach of using tiles does not seem fit in this case.

Thank you.

29 Replies
DougBrowning
MVP Esteemed Contributor

Your two questions in Red.

7.  No I mean a regular Feature Service.  So in ArcMap - Share As Service then check the Feature access box.

8.  Use the Feature Service URL from 7 above.  Paste this in to the Settings page then give the Form name that matches the name of that layer in the Feature Service.  So if you published it as Feature Layer Xname put Xname in the Form name and the URL in the settings tab in Excel to match.  Then you just republish so that the URL change is up on the web.  Then the original Survey123 service will not be used anymore but the Form Item will be.

I do see errors in the workflow you posted.  This part is wrong

""Steps in Survey123:

  1. Launch Survey123 Connect:
  2. Click New Survey > Click the radio button "Feature Service" > Click the feature service published from the data created in the first part of this document > Create Survey
  3. In Survey123 Connect click the "Settings" button > Inbox > Enable "Inbox mode" > Disable the setting to "Apply a spatial filter when the map view of surveys is visible"

Publish this survey to ArcGIS Online""

You do not Create the Survey123 from the FS.  You first create it in Survery123, then download and paste, - then create the FS using ArcMap then just point Survey123 to it.  Remember you are just repointing Survey123 to a different Hosted Feature Service.  Also you are not going to use the Inbox feature.  Not sure where this part came from.

So to some up.  First you create a new Feature Service from Survey123 like always.  Then download this service template gdb and add it to the "master" gdb.  Publish this "master" gdb as a totally new Feature Service *using ArcMap.  Then point Survey123 form to this new service that ArcMap created.  Republish the form so that this repointing is in the Form on the web (but no Feature services will be changed at all in this step - you are only repointing the form).

Also using Gloabal ID can be funky (but I think not anymore).  I would use another key.  

Hope that helps.  You can PM me if you like.  I am on furlough and bored so I can help you out if you like.

0 Kudos
daveostrander
Frequent Contributor

Doug thanks so much for getting back to me on this! 

"Also you are not going to use the Inbox feature.  Not sure where this part came from."

That came from Esri support when they were working with me on implementing this setup back in 2017. I will just ignore that step going forward. 

"Also using Gloabal ID can be funky (but I think not anymore).  I would use another key."

I was using Ismael's blog post "Working with existing Feature Services in Survey123 for ArcGIS" as my reference, which seemed to mandate using GlobalIDs for the keys (see screen shot below of the pre-requisites). I typically use GlobalIDs for all my relationship classes as they are the most unique field type.

 

Anyway, thanks for the suggestions, and I will be in touch should I get into more trouble with this.

AnthonyJonesRSK
Frequent Contributor

Hi Doug,

Thanks for outlining your methodology on this. I managed to implement this on one of my own jobs and it works brilliantly. It's so good being able to use Collector for the geometry but then have the survey results as a related table in my web app.

I just wanted to know though whether in your examples if your survey123 form contained repeats? On another job I tried this on our form has around 8 repeats so obviously these appear as related tables in my geodatabase once I'd downloaded my initial survey. I can't seem to get these related tables to work once I publish my related Collector and Survey123 data back online. Under the data tab of my layer it lists a number of related tables but the name of the relationships just appear blank. I've included the related tables in my Pro project before uploading but they don't appear to publish properly.

I need to do some more investigation around this but just wondered if you had seen anything similar to this?

Thanks

Anthony

DougBrowning
MVP Esteemed Contributor

Mine has 9 forms with almost all of them having repeats.  I did notice, as you say, that Survey123 seems to be leaving the To and From labels of the Relationship class blank.  It tends to name the RC itself a number also.  At least when you download a GDB that is what you see.  I have not worried about it much but it does mean the drop downs for the RCs in the attribute table are blank.  So it would be nice if this was fixed.  You could try adding a label then republish but I am not sure you can change those names after the fact.  Everything seems to work ok since it uses numbers internally.

Survey123 - why are these attributes in the Relationship classes being left blank?

Thanks

AnthonyJonesRSK
Frequent Contributor

Thanks for your response Doug. I managed to get this working in the end, not sure what was causing the issue the first time but can see all my relationships now so again thanks for outlining your method it's been really useful. 

I attempted to expand on it a bit myself as I tried to build a survey on top of the related table/repeat of another survey. This was because there is a repeat in my survey that may need to be completed at a later date and although I could access it via the Inbox the repeat has attachments so these would not be editable from the inbox. I thought then that if I create a url link to this other survey from my main survey that passes the globalid to the parentglobalid then data could be added to the repeat at a later date, attachments and all. Unfortunately I couldn't find a way to expose the globalid of my underlying feature service of my main survey for use in my url. Do you know if it's possible to include the globalid in any calculations? 

Sorry, this may be a question for the wider Survey123 team but you seem to be a man in the know!

Thanks

Anthony

0 Kudos
DougBrowning
MVP Esteemed Contributor

ParentGlobalID is probably protected or something but I am not sure.  You cannot edit an existing record either yet. 

You could try to use your own ID fields and then create a second relationship class that ties them together using your ID instead.  You can use a calc field in the repeat that adds that ID to each repeat record.  I do this a lot so that when you are way down in a repeat you still have that PrimaryKey.  That way I never really use globlaid and parentglobalid at all.

For me if a part of a form will be done later I like to make it its own form.  That way I have editor tracking, GPS (shows me if they went to the wrong spot), etc.  Putting revisits in a repeat is not a good workflow in my opinion - 2 visits should be 2 forms.

Sorry I am not much help on this one.

0 Kudos
NaomiBegg2
Deactivated User

Hi Doug

"Go into the Survey123 form and set the submission_url to the new HFS you just published."

Is there any way that this can be done using the online survey builder or must it go through Connect?

0 Kudos
DougBrowning
MVP Esteemed Contributor

Sorry I have only ever used Connect.  I think you can import into Connect though.  I looked on the web version and did not see it.

0 Kudos
NaomiBegg2
Deactivated User

Hi Doug, I'm still getting confused with this submission url thing.  

The below from Survey123 documentation has me completely confused!  https://doc.arcgis.com/en/survey123/desktop/create-surveys/survey123withexistingfeatureservices.htm

You need to provide the URL of the feature service item, as seen above. A common mistake is to use the feature service URL instead, which is not supported.

I am getting this error message when I try to publish.

This here is my Feature Service item URL? https://services7.arcgis.com/S7DHOirgbYgdtrbR/arcgis/rest/services/survey123_536269680eb04998a5baf98... 

0 Kudos
DougBrowning
MVP Esteemed Contributor

You should not have the /0 in there.  Just end with FeatureServer.  Also no token at the end of course.

So  this 

https://services7.arcgis.com/S7DHOirgbYgdtrbR/arcgis/rest/services/survey123_536269680eb04998a5baf98...

Then you set form_id (also in settings) which is used to find the right layer instead of the /0.  So your /0 layer is called surveyPoint.  Put that in form_id.

On another not you have some crazy long field names.  I would watch that, could get you.

0 Kudos