Feature Selection and Letter Generation in WAB

1056
2
Jump to solution
08-11-2016 05:31 AM
deleted-user-FTxtuSQd67Ur
New Contributor III


I'm finding myself stuck on finding a solution to this problem.  We are doing address change requests through the GeoForm and we had a JavaScript that would take certain fields (parcel address, applicant first name, applicant last name) from a selected point and then throw them into a print service with custom letter templates (made from mxd's) to generate letters that we would then send back to those who requested them with all of their information already populated into the fields on the letter.

However, we are migrating everything to WAB and I am finding it hard to figure out how to replicate this.  Do we need to somehow create a custom widget? If so, I'm not the best at coding yet and we are kind of on a time limit for getting this up and running.  I didn't know if it was possible to create a geoprocessing service that would select an address point, take out those fields, and then send them to the custom print service? Or if we just needed to re-do everything and try another avenue.

Any help or insight would be appreciated!

Thanks!

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Carissa,

  I am not sure about the GP route but creating a custom widget would be the way to go.

  • Select the point on the map using jimu DrawBox dijit to draw a extent on the map and select the intersection point on the map using a QueryTask and the drawn geometry.
  • Once you have the results of the query you will have access to the fields you want and then you will use the PrintTask and the PrintTemplate object to set the customTextElements (which is where you would supply the field values that the template is expecting).

This could be daunting if you are not familiar with JS development and on a tight time line.

Here is the sample for creating a basic (no real functionalit) widget in WAB:

Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developer...

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Carissa,

  I am not sure about the GP route but creating a custom widget would be the way to go.

  • Select the point on the map using jimu DrawBox dijit to draw a extent on the map and select the intersection point on the map using a QueryTask and the drawn geometry.
  • Once you have the results of the query you will have access to the fields you want and then you will use the PrintTask and the PrintTemplate object to set the customTextElements (which is where you would supply the field values that the template is expecting).

This could be daunting if you are not familiar with JS development and on a tight time line.

Here is the sample for creating a basic (no real functionalit) widget in WAB:

Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developer...

View solution in original post

0 Kudos
deleted-user-FTxtuSQd67Ur
New Contributor III

Robert,

Thank you for your quick response and insight! I am trying my best to learn JS on the fly and can try and take a look at the documentation and give it a try!

Thanks!

Carissa

0 Kudos