How-to guide on adding selected parcel information to the Print Service for a WAB application. Thanks Robert
Solved! Go to Solution.
Lauren,
In that custom python script you are referencing each of the selected features attributes should be printed.
It would look like this:
Layer Name
Field name Field value
Field name Field value
Field name Field value
..... ................
If you are not getting this then you have made a mistake or missed a step.
The Discussion James an I are having in this thread does not use that custom python script print service. I make edits to the Print widget in WAB Dev Edition to check for a specific graphics layer in the app and take that GLs specific attributes and add them to the print widgets cTextElements (custom text elements object). The names of those custom text elements match the names of the elements in my custom print layout template.
I wanted to clarify, since I've had a hard time filtering through the many Discussions; this process only allows 1 selected feature to pass to the print widget?
If someone wanted to print multiple selected features from same feature layer, then they would need to use the python script option from the "Printing Popups From Web Application" blog?
Justin,
The way I handle it when users have multiple parcels selected is to just grab the parcel Id and concatenate the ids into a comma delimited list and send that string to the print service, since a print layout normally only allows for one parcels specific info. You can see that at line 54 in the code I posted to this thread originally.
Thank you for the reply. I appreciate it!
Robert,
Thank you, your code works very well for my use, form printing !
Is it possible to use linked attributes as they appear on the popup {relationships/0/NAME} in the term gra.attribute.NAME ?
Jacques
Sorry, I have never tried that.
I recently upgraded to Developer 2.4 and ESearch 2.4 and this no longer seems to work, the operational layer doesn't supply the Print widget the parcel details anymore. Any ideas to why?
James,
I made the changes to the Print.js in a new 2.4 app and made sure that the eSearch widgets result were added as an operational layer and the print widget was using my print service that had the custom print template and I had no issue at all.
Well I made it work again by downgrading the Print and Esearch Widgets back to 2.1.2, I couldn't get them to work in the new 2.4, I guess I'll have to try remaking everything from the start.
Strange, Like I said I used 2.4 WAB and 2.4 versions of the widgets without issue.