Select to view content in your preferred language

Survey published to Enterprise but asks for AGOL login

605
5
Jump to solution
11-03-2022 01:39 PM
ZachBodenner
MVP Regular Contributor

I have a survey that I created in Connect, published to Enterprise. Everything seems to work just fine with survey. My problem is arising when trying to link to a survey record in the Survey123 manager. In the web map where survey results are managed, I am creating a link so that the user can link directly to the Survey123 manager to export reports. 

Here is my Arcade expression:

var eventformID = '160110589ab542ef92079dedb043c503'
var eventFormURL = "https://survey123.arcgis.com/surveys/" + eventformID;
var eventObjectID = $feature.OBJECTID;
return eventFormURL + "/data?objectIds=" + eventObjectID

Then the Returned URL is used as a hyperlink to the record.

Here's the weird thing: If I've logged in to the Survey123 manager in my Enterprise Portal before I click any of these links, I get there fine. But if I have not (not cached in the browser, I'm guessing), then when I click on the link I am prompted for AGOL login credentials:

 

ZachBodenner_0-1667507897375.png

 

But the form is published to Enterprise so...does anyone have any ideas for how to get around having to login manually? I hope that the link would go directly to Enterprise login prompt instead of AGOL.

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

Oh, whoops! S123 is very sensitive to capitalization in URL params. It's portalUrl with a lower-case P. Try that?

Also, what's the data parameter do? I've never used it.

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
5 Replies
jcarlson
MVP Esteemed Contributor

The URL needs the parameter &PortalUrl=<yourURL> added to it so that S123 knows explicitly to look in your org for the form.

- Josh Carlson
Kendall County GIS
0 Kudos
ZachBodenner
MVP Regular Contributor

Thanks for such a fast response! I based my Arcade expression and URL specifically to hit something like this, which is what I see in the manager:

https://survey123.arcgis.com/surveys/160110589ab542ef92079dedb043c503/data?objectIds=3204 

So I added the Portal url:

https://survey123.arcgis.com/surveys/160110589ab542ef92079dedb043c503/data?objectIds=3204&PortalUrl=<myURL> 

And I get an error saying I need an AGOL organization:

ZachBodenner_0-1667508710240.png

ETA: The warning appears after I'm prompted for sign in via Enterprise, so that's something!

0 Kudos
jcarlson
MVP Esteemed Contributor

Oh, whoops! S123 is very sensitive to capitalization in URL params. It's portalUrl with a lower-case P. Try that?

Also, what's the data parameter do? I've never used it.

- Josh Carlson
Kendall County GIS
0 Kudos
ZachBodenner
MVP Regular Contributor

That seemed to do the trick! The data parameter seems to select the record in the data table, so that my user (not super tech/GIS savvy) can go from web app to S123 manager and easily export a report based on my pre-loaded template. 

0 Kudos
jcarlson
MVP Esteemed Contributor

Ooo, I've definitely got a future use case for that!

- Josh Carlson
Kendall County GIS
0 Kudos