How to create Print Tool with Custom Layout

2081
5
Jump to solution
10-21-2020 01:11 PM
jacquelinewillan1
New Contributor III

Hello,

I am trying to use a custom layout with the out-of-the-box Web App Builder. I have followed documentation to run the 'Export Web Map' tool from ArcMap, leaving the 'Web Map as Json' parameter blank, as the docs say. I then run the 'Get Layout Templates Info' tool. Then I published the 'Export Web Map' Tool, and in the publish dialog I selected 'Add a Result' and choose the 'Get Layout Templates Info' tool result, per the documentation. The tool publishes without error. I then add a geoprocessing widget to a Web App Builder application. The service has 2 tasks, and only one can be selected. When I enter the url for the service I published "..rest/services/EnergyAtlas2/ExportWebMapAgain/GPServer", into the dialog for the geoprocessing widget, I then have to select one of the tasks, then I can hit 'OK' to create the geoprocessing widget. I've tried making a widget for each task, Get Layout Templates Info, and the Export Web Map tool, and then running the 'Get Layout Templates Info', which appears to run successfully. But how is the output from this task supposed to be input to the Export Web Map tool? I tried to run the Export Web Map geoprocessing widget, but it requires the 'Webmap as JSON' input and I don't know how to get that.   I must be missing something real obvious - can anybody tell me what I'm missing?  Thanks for your help!

0 Kudos
1 Solution

Accepted Solutions
jacquelinewillan1
New Contributor III

Thanks - I figured out the problem - I was trying to use the Export Web Map service with a geoprocessing widget, and I needed to use the print widget. Once I switched to the print widget, it worked. Thanks for your help!

View solution in original post

0 Kudos
5 Replies
EduardBeneke
Esri Contributor

Hi Jacqueline,

Try using the full url to the Export Web Map endpoint (add /Export%20Web%20Map%20Task/execute to your url)

This endpoint should contain the list of templates from the Get Templates operation in the Layout_Template field automatically.

Regards

0 Kudos
jacquelinewillan1
New Contributor III

I tried and get the response 'undefined' for the tool, but it creates a tool widget. However, trying to use the widget gets no response (no error, but no response). Any other suggestions? Thanks!

0 Kudos
DavidPike
MVP Frequent Contributor

It's been a while since doing one of these glorious print task, but have you tried rest/services/EnergyAtlas2/ExportWebMapAgain/GPServer/0?

0 Kudos
jacquelinewillan1
New Contributor III

Thanks - I figured out the problem - I was trying to use the Export Web Map service with a geoprocessing widget, and I needed to use the print widget. Once I switched to the print widget, it worked. Thanks for your help!

0 Kudos
ahargreaves_FW
Occasional Contributor III

I'm now stuck trying to configure the Web AppBuilder Print Widget with a custom Print Service URL. As explained above I've followed this documentation and successfully have, and configure, the print widget to use my service URL of:

https://myorg.domain.com/hosting/rest/services/PRINT_TEMPLATES/FCWA_PRINT_TEMPLATES/GPServer/Export%...

 

However, I get the below error with no further info, even in the portal logs:

ahargreaves_FW_0-1657126653452.png

 

0 Kudos