Define default Portal with Survey123 Template

241
4
Jump to solution
12-14-2018 11:51 AM
Highlighted
New Contributor III

I am attempting to edit the Survey123 Template in AppStudio. My goal is to customize the template so that when users press Sign In, they are redirected to our organizational ArcGIS Online enterprise login page.

This customization allows our field staff to avoid pressing "Enterprise Login" from the main ArcGIS Online page, then typing in our organization short name (smgov), and then pressing sign in with their enterprise credentials.

For example, instead of the default portal being "https://www.arcgis.com", I'd like the default portal to be "https://www.smgov.maps.arcgis.com"

What's very strange is that I was actually able to accomplish this by editing the Portal.qml file. I changed kDefaultPortalUrl from arcgis.com to smgov.maps.arcgis.com. I was excited because this worked, at first. Now, when I ran the Survey123 Template and pressed sign in, our Enterprise portal sign-in came up by default (yay!). But then, it just stopped working. I don't know what happened but now the edited kDefaultPortalUrl variable no longer influences the application's behavior. 

Am I going about this the right way? How do I define the default Portal url?

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Regular Contributor

Zachary, 

I have done similar customization in the past and these are the changes we did,

  • Portal/PortalsList.qml on the "kDefaultPortal" property 

  • Portal/Portal.qml inside the "readSettings()" function

cc: Survey123 for ArcGIS

Thank you,

Erwin

View solution in original post

Reply
0 Kudos
4 Replies
Highlighted
Esri Regular Contributor

Zachary, 

I have done similar customization in the past and these are the changes we did,

  • Portal/PortalsList.qml on the "kDefaultPortal" property 

  • Portal/Portal.qml inside the "readSettings()" function

cc: Survey123 for ArcGIS

Thank you,

Erwin

View solution in original post

Reply
0 Kudos
Highlighted
New Contributor III

Hi Erwin,

Thanks so much for the detailed reply! This works!

Reply
0 Kudos
Highlighted
New Contributor III

Erwin Soekianto‌  I'm revisiting this topic with AppStudio 4.1 and the Survey123 Template version 3.7. 

The structure of the Qt files has changed in this newer version of Survey123. I am having trouble defining a default portal url. I am trying to route users to www.smgov.maps.arcgis.com where they can login with their enterprise logins. Thank you for any help you can offer!

Reply
0 Kudos
Highlighted
Esri Contributor

Did you manage to make this work with the latest AppStudio and Survey123 Template?  @ESoekianto-esristaff 

Reply
0 Kudos