How to print selected attributes on parcels in WAB application

8579
28
Jump to solution
10-07-2016 08:14 AM
JamesMarok1
New Contributor III

How-to guide on adding selected parcel information to the Print Service for a WAB application. Thanks Robert

0 Kudos
28 Replies
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
JustinJacobs
New Contributor II

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?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
JustinJacobs
New Contributor II

Thank you for the reply.  I appreciate it!

0 Kudos
JacquesBrodard
New Contributor III

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

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sorry, I have never tried that.

0 Kudos
JamesMarok1
New Contributor III

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?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

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.

0 Kudos
JamesMarok1
New Contributor III

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.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Strange, Like I said I used 2.4 WAB and 2.4 versions of the widgets without issue.

0 Kudos