Using survey123 website URL parameters to generate feature reports

415
4
06-24-2021 01:03 PM
Hussam_AlJabri
Occasional Contributor II

Hi All,

Could anyone help me to understand what we can add in the survey123 website url to go directly to the specific point in the page. 

 

For example:

https://survey123.arcgis.com/surveys/xx/data?report=format:docx;objectids:all&extent=&filter=(0.)&portalUrl=https://xx.xx.com/portal

 

As we can see the elements are report,extent,filter,portalUrl and so on.

Basically, I have a survey and its results presented in the dashboard and  the users can click on the link to generate directly a report for the filtered feature and the link is like below:

Hussam_AlJabri_0-1624614363527.png

https://survey123.arcgis.com/surveys/xxx/data?report=objectIds:selected;format:docx&filter=(0.dss_gi...

https://survey123.arcgis.com/surveys/xxx/data - this will open the data tab

?report=objectIds:selected;format:docx;templateItemId:xx - will open the feature report window in the lift of the page and select "selected records only" and chose format as .docx and chose the template.

Here I need to go deeply to name the report and unchecked "Save to my ArcGIS account"

then generate the report automatically.

Kindly support @JamesTedrick 

Tags (1)
0 Kudos
4 Replies
ZacharySutherby
Esri Regular Contributor

Hello @Hussam_AlJabri

Unless you need the UI, I would suggest using the Survey123 Report REST API. Using the Report REST API you can send your report requests exactly how you like. 

I have a very basic sample app in GitHub that shows how the Report REST API can be used in a custom application that ultimately can be embedded in a Dashboard. 

Thank you, 

Zach

Hussam_AlJabri
Occasional Contributor II

Thanks @ZacharySutherby

 

Would you please help me to apply your idea to generate a report using survey123 API because I'm not sure if I understand to try it.

 

regards,  

0 Kudos
NicholasDay
New Contributor III

Our process is a little different but the concept is the same, being the user can generate the report; however, we are still using the UI. In our process, once the user submits the survey a webhook sends the user an email with a link to the Survey123 website for the selected survey and record, all they have to do is click generate. This gives them the option to make any changes to the report name or location if desired.

 

Our issue is that the templateItemId gets dropped when the page loads. This is critical for us because some of the surveys have more than one template and the correct one needs to be selected.  Do you have more than one template in your survey? If so, are you able to select the correct one? For surveys with only one template this does not cause an issue.

0 Kudos
Hussam_AlJabri
Occasional Contributor II

Hi @NicholasDay,

I can manage the templates by setting templateItemId and it is working fine.

Please vote for my Idea on this regards

https://community.esri.com/t5/arcgis-survey123-ideas/generate-feature-report-directly-by-url-paramet...

0 Kudos