Link to Survey123 From from Web App

419
7
09-29-2021 04:48 AM
JasonCyphers
Occasional Contributor III

Trying to add a link to a Survey123 from from an "About" widget in a web app, but get an error stating the URL is not valid.

I've tried a couple methods to link to the form:

Launching the PC app: arcgis-survey123://?itemId=formid

Launching Survey123 web form: https://survey123.arcgis.com/share/formid?portalUrl=https://company_portal_url/arcgis

JasonCyphers_0-1632915871408.png

 

Using this link anywhere else works fine.  Any ideas?

Additionally, is it possible to include parameters to pull a specific record based on global id (&field:GlobalID={GlobalID}).  If so, where would that go in the URL string for the portla-specific link? (I can get it to work in the arcgis_survey123 link)

 

0 Kudos
7 Replies
codergrl
New Contributor III

Looks to me like the url is https://survey123.arcgis.com/share/itemid?portalUrl=https://company_portal_url/portal

And to open in app it's https://survey123.arcgis.com/share/itemid?portalUrl=https://company_portal_url/portal&open=native

0 Kudos
JasonCyphers
Occasional Contributor III

Tried your suggestion, still get the error that it's an invalid URL 😞

0 Kudos
codergrl
New Contributor III

Just re-read your question and I realized my initial answer was way off. That's what I get for looking at this stuff before coffee. 

I think the issue is the second https:// in the url. I would try a url shortner to create a URL that the widget won't complain about. I use bit.ly for a lot of stuff. It has a free tier.  

I made one that you can use to test https://bit.ly/3uAhYNH

0 Kudos
DougBrowning
MVP Notable Contributor

Windows is a diff URL.  See here.  https://community.esri.com/t5/arcgis-survey123-questions/survey123-custom-url-windows-browsers/m-p/7...

I never did get it to work right though.  I never got to test having a admin install the app though.

0 Kudos
JasonCyphers
Occasional Contributor III

FINALLY got it to work.  Seemed there was a space getting added to the end of the URL string when I'd double-click on it to copy/paste it; so, launching Survey123 from a web app, to place a new feature, works.

My next issue is being able to edit that feature, via Survey123 via the web app.

I created a pop-up, and included a "click here to edit" hyperlink that launches the Survey123 form, but I'm not able to get it to pull up the specific record... even with an edit clause in the URL:

arcgis-survey123://?itemId=formid&mode=edit&field:GlobalID={GlobalID}

With and without the "&mode=edit", all I can ever get the link to do is to launch the Survey123 desktop app to enter a new point, it never populates with the existing point's attributes.  

If I use a Portal-specific URL...

https://survey123.arcgis.com/share/formid?portalUrl=https://my_company's_portal_url/arcgis&mode=edit&globalId={GlobalID}

...the web form launches, with the feature's attributes already populated in the survey; however, some auto calculations I have to calculate the difference in report time and on-scene time (in minutes) doesn't work.

0 Kudos
codergrl
New Contributor III

I know this is something that is supposed to work but I was never able to get it working either. If you figure it out I'd love to hear how you did it

0 Kudos
JasonCyphers
Occasional Contributor III

I got the calculations to work in the Survey123 web from, so launching Survey123 web from from the feature's attribute pop-up in a web app works.  I'm back to the issue of launching the Survey123 web form from the web app via hyperlink text in the 'about' widget.

Adding &open=native works great at opening the survey via the desktop app; however, end users like the web form better (and so do I honestly - doesn't require installing desktop Survey123 app and downloading form for every user).

I've tried several combinations of URLs, but can't get any of them to work.  Oddly, adding a link to the web app's header, using the https://survey123.arcgis.com/share/formid?portalUrl=https://my_company's_portal_url/arcgis format, works, but would require the 'About' widget text (which is acting as directions on how to add/edit a feature) to be modified from "To add a new feature, click here." to "To add a new feature, click on Add New Feature in the header section" (I can see this being confusing for some people).

0 Kudos