Can a Survey123 survey point be used as a Story Map Map Tour template tour point?

1658
6
03-22-2018 07:42 AM
MapEnglish
Occasional Contributor

Sorry for the lengthy question. The desired workflow is a user submits a Survey123 survey and the submitted point feature (including an image) automatically becomes a new tour point in a Map Tour story map. If this is not possible, what's the recommended workflow? Manually create a new tour point by "copying and pasting" location, attributes and photo attachment from the survey? I'm thinking of button clicks vs. automating this with Python for the time being.

Cheers,

Matt English

6 Replies
MarikaVertzonis
Esri Regular Contributor

Almost.

This is mostly done with out-of-the-box steps, and one sneaky modification. The last step is not currently working, but is a known issue to the AppStudio team. In the meantime:

1) Start by building a survey and publishing it - here is an example spreadsheet that i use. (The choices sheet only has a list of colors for the points)

2) In ArcGIS Online create a webmap from the feature service that is generated by Survey123 Connect when you published your survey.

3) In ArcGIS Online choose to create a web app (using the story map tour template) from the web map. you will know you've done this right if you DONT get asked where your images are stored.

4) Modify the JSON of the web app (this is the sneaky bit)

     - launch ArcGIS Online Assistant and browse to your story map web app

     - in the 'i want to' drop down, choose view an items JSON

     - in the data window, delete the 'order' property and save changes

yes this step looks dangerous and if done wrong, it can break your web app. but this is essential for the new records submitted by Survey123 to automatically appear in the story map web app. just make sure you still have the right amount of commas and brackets in the code.

5) Create a map tour app from the story map web app. I tried this again in appstudio.arcgis.com today but I'm not seeing the images. The team will need to come back to this conversation with a response for this last step, but I didn't want to leave you without the first 4 steps. With those you can at least have a web version of the map tour work.

TomThompsonEsriCA
Esri Contributor

Hi Marika,

Has the development team had a chance to explore why the images, when submitted via Survey123, aren't displaying properly in Map Tours in AppStudio?

Do you think getting a BUG logged for this issue will help move things along? I can get a case created.

Thanks,

Tom

MarikaVertzonis
Esri Regular Contributor

The map tour app template currently can not read the images from attachments and will need some rework. Please do submit a bug with tech support (and i encourage any other wanting to use Survey123 and Map Tour together to do the same). It will help us quantify and prioritize the work.

PatriciaCarbajales-Dale
New Contributor III

Hi Tom, Marika,

I am very interested in this workflow. Do you have a link to vote for this bug so you can prioritize?

Thank you!

Patricia

0 Kudos
TomThompsonEsriCA
Esri Contributor

Hi Patricia,

We were able to find a workaround for this using Survey123 Webhooks and Integromat, so we did not log a bug for this. I'll summarize below:

  1. We first added two hidden fields to the survey being pic_url and thumb_url (which the Storymap tour defaults too for images)
  2. We then made a public Feature Layer View of the Survey123 Hosted Feature Service
    1. This was so we are able to access and build the URL without the need of appended short lived tokens, which would eventually expire and break the image URLs
  3. Then through Integromat, we made an HTTP GET request to the REST API using the Query Attachment operation on the view
    1. This gave us the attachment URL stored in the GUID field, again, without the token appended
  4. We then used HTTP POST request to the Update Features Operation in the REST API, passing in this URL to the pic_url and thumb_url fields. 
  5. AppStudio Map Tour template was able to read and understand the URLs in these fields, but you may run into other problems related to the Order Array, if you can help it - don't delete that from the JSON otherwise it'll break it even further. 

We have some information on Integromat and Webhooks, found here.https://community.esri.com/groups/survey123/blog/2018/03/05/sneak-peek-survey123-and-webhooks-integr... 

Hopefully that helps,

Tom

0 Kudos
MarikaVertzonis
Esri Regular Contributor

Its been a long time coming, but here is an update to the steps that I previously posted about using Survey123 to populate a Map Tour app.

1) Start by building a survey and publishing it - you can use the same example spreadsheet linked above. To help troubleshooting in the following step, I recommend creating a few test points.

2) In ArcGIS Online, browse to the webmap that Survey123 automatically generated along with the survey form. While your here - make the webmap and its associated feature layer, public (only public feature layers can be used in a map tour app)

3) In ArcGIS Online, inside the webmap item itself (on the right hand side), choose to create a web app (using the story map tour template) from the web map. You will know you've done this right if you DON'T get asked where your images are stored. Be sure to save the resultant story map and make the story map public.

4) Modify the JSON of the web app (this is the same sneaky bit described previously)
    - launch ArcGIS Online Assistant and browse to your story map web app
    - in the 'i want to' drop down, choose view an items JSON
    - in the data window, delete the 'order' property and save changes

Yes this step looks dangerous and if done wrong, it can break your web app. But this is essential for the new records submitted by Survey123 to automatically appear in the story map web app. Just make sure you still have the right amount of commas and brackets in the code.

5) Create a map tour app in AppStudio.

    - Choose the map tour template to create your new app, and open Settings. Go to Properties > Gallery and enter the id of the story map web application that you just created:

https://devtopia.esri.com/storage/user/106/files/25cbb280-6535-11ea-8ced-a352580c4820

    - After you apply your Settings, double click on your new map tour app in the AppStudio gallery: you should see the tour points that you have collected in Survey123!

NB: For a tour point to appear, it must have two images: a thumbnail and a picture. To see any newly captured points in the map tour app, the user must go to the Gallery page of the app, and choose Clear Offline Data. Once cleared, the next time the tour is launched the tour points will be re-downloaded, along with any new points and their images.

0 Kudos