Hello,
Would someone be able to advise if it's possible to pull all Portal usernames into a dropdown list within a Survey 123 form? I have seen some articles indicating that it might need to be done using the Python API, but I'd like to do it directly within Survey 123 Connect by pointing to our list of Portal logins.
Thank you,
Paul
Solved! Go to Solution.
Yeah, I totally get wanting to avoid having to manually do that. You might still be able to automate it though. You can have a Python script that exports all your Portal users using the ArcGIS Python API, then you could insert that into a CSV using Python, then using the Python API to upload that CSV to Portal as an item that your S123 form references. The only thing I'm not 100% sure about is if your S123 form will have any issues referencing the CSV if you delete/re-upload it when you go to update it with new users.
Of course I know it would be better to have a more native way of accessing Portal users from S123, but this is the best option that I could think of. And theoretically, it should be able to be automated.
I'm not aware of a way to pull all Portal usernames into a dropdown coming directly from Portal. However, you could use the pulldata() function to pull all Portal usernames that you insert into a CSV and publish alongside your S123 form. So you could manually insert all your Portal usernames into a CSV and then use the pulldata() function to populate a dropdown that way.
Thanks Ryan, I'd like to avoid having a manual element to this if possible. What we're looking to do is tie the Portal users to our Active Directory (i.e., a Portal user gets added to our Enterprise each time a person is added to the Active Directory). Our firm is 700+ people, which would make manually updating a CSV a challenge.
I could see how the ArcGIS API for Python might help with this, but it'd be much more ideal if it could be done directly in S123.
Yeah, I totally get wanting to avoid having to manually do that. You might still be able to automate it though. You can have a Python script that exports all your Portal users using the ArcGIS Python API, then you could insert that into a CSV using Python, then using the Python API to upload that CSV to Portal as an item that your S123 form references. The only thing I'm not 100% sure about is if your S123 form will have any issues referencing the CSV if you delete/re-upload it when you go to update it with new users.
Of course I know it would be better to have a more native way of accessing Portal users from S123, but this is the best option that I could think of. And theoretically, it should be able to be automated.
I think this is probably the route I'll take. I appreciate you walking through this process. As you mentioned, it'd be nice if this was a native task that could be built into S123, but this work around will get it done. Thanks again!