Our organization has a password-protected Experience that guides users to a public Survey123 web form when a feature on the map is clicked (the users are all of the Viewer type, so the survey has to be public). This action not only invokes the survey form but also pre-populates one of its fields with a key value from the clicked map feature. Does anyone know of a way to also push the signed-in username value from the Experience to the survey form? I need this information but have yet to figure out a way to automate its entry due to the survey being open to public submissions (the question type “username” logs ESRI_Anonymous upon submission, for example).
Adding the parameter signIn=true to the survey URL is one way I’ve found to force-populate the needed info by having users click on the sign in button, but the text is small and out of the way, especially on a cell phone screen, and it can easily be missed/ignored. If I could alter that button so that it’s a huge element that takes up most of the display, like a splash screen, then I could live with it, but as-is it’s just too easily bypassed…
So, yeah, I’m kind of stumped. Is there some way to parameterize the logged in username that I just haven’t found yet? If not, is there some way to manipulate the sign in button characteristics in Survey123 Connect that’ll let me give it the appearance & behavior I want?
Solved! Go to Solution.
I am wondering if you could solve this with a combination of Arcade and Survey123 URL parameters. You could try to use GetUser and the URL parameter field:fieldname to prepopulate a user name field in your survey.
I am wondering if you could solve this with a combination of Arcade and Survey123 URL parameters. You could try to use GetUser and the URL parameter field:fieldname to prepopulate a user name field in your survey.
Thanks for sharing your thoughts, @AndreasHall. If I follow you correctly, maybe I could achieve this via Arcade expression in the popup?
Yes, it is worth trying 🙂
Your suggestion worked like a charm, @AndreasHall! It does exactly what I need it to do. I wrote a custom attribute expression that pulls the username then added it as a URL parameter bound to the target field in the survey. I'd give you five kudos if I could. Thank you!
I've added a few screenshots of what I did in the chance it helps out any other neophytes.