Select to view content in your preferred language

Web App Builder print widget with custom parameters

803
2
Jump to solution
08-04-2023 09:37 PM
gabriellasmarquez
New Contributor

Hello, I have a print service that is exporting a web map using a custom layout with a map series enabled. I have a custom parameter that lets users select a page from the series to export. The tool works in ArcGIS Pro, however in Web App builder, the print widget only supports the format and layout template parameters. The print widget will only export the page that is selected by default, but there is no drop down for users to change the default. I'm thinking to use the Geoprocessing widget, but I'm unsure how to have it convert the web map to JSON? I'm assuming this is something I would have to set in the python script? Any ideas are greatly appreciated!

parameters in Pro: 

gabriellasmarquez_1-1691209978726.png

print widget parameters:

gabriellasmarquez_2-1691210034543.png

 

Geoprocessing lets me choose the Sheet, but not sure how to automatically give it the web map as json.

gabriellasmarquez_0-1691209763759.png

 

currently the print widget provides the json, is there a way I can provide it here?

gabriellasmarquez_3-1691210150590.png

 

 

1 Solution

Accepted Solutions
sxw_eaglegis
Esri Contributor

Hi gabriellasmarquez,

I don't believe you would be able to send the web map as JSON using the geoprocessing widget, would need to use either the print widget or develop your own widget to get the web map as JSON on the client side.

I'm thinking you might need to use the print widget and then use a custom python script to create the export. What you could do is have a select/search tool for the user to select the map series they need on the map, then create a print using the print widget. The web map JSON that is sent to the python script/GP service will include the map series the user selects, you could then have some logic in the python script to select that map series and export to PDF.

 

View solution in original post

2 Replies
sxw_eaglegis
Esri Contributor

Hi gabriellasmarquez,

I don't believe you would be able to send the web map as JSON using the geoprocessing widget, would need to use either the print widget or develop your own widget to get the web map as JSON on the client side.

I'm thinking you might need to use the print widget and then use a custom python script to create the export. What you could do is have a select/search tool for the user to select the map series they need on the map, then create a print using the print widget. The web map JSON that is sent to the python script/GP service will include the map series the user selects, you could then have some logic in the python script to select that map series and export to PDF.

 

gabriellasmarquez
New Contributor

Thank you! I'll try that out.

0 Kudos