ArcGIS JavaScript App - Edit Geoprocessing Widget Results Display

4966
17
04-03-2015 11:01 AM
JoshuaFarrow
New Contributor

As part of my JavaScript App, using Web AppBuilder, I created two geoprocessing widgets. One allows the user to input a user defined area to calculate population density (Zonal Statistics as Table tool). After the tool has ran, the geoprocessing widget returns a table with the following fields:

RowidFIDCOUNTAREASUM

Is it possible to configure the results to only display the SUM field? Something like "Total Population: [SUM]" in the results tab.

My other geoprocessing widget allows the user to input a user defined area to calculate the total number of structures within a given area (Spatial Join). The results are drawn on the map - making the user select the output polygon to retrieve the count total. Similar to my first question, is it possible to display the structure count within the geoprocessing results tab opposed to on the map within a polygon?

Thank you.

Tags (2)
0 Kudos
17 Replies
TerryGustafson
Occasional Contributor II

Did you have any luck figuring this out?  I also wanted to do something similar and format a return values number of decimal places..

0 Kudos
TerryGustafson
Occasional Contributor II

did you ever figure this out?  I did something like it so let me know.

0 Kudos
JunshanLiu
Occasional Contributor III

For now, WAB doesn't have this feature.

0 Kudos
RobertMueller_Jr1
New Contributor III

Junshan-

Any idea when these might be a feature in AGOL? I've been doing a pretty thorough search without luck on where to get started on attempting a GP, and it seems to be a fairly requested item.

Thanks

0 Kudos
TerryGustafson
Occasional Contributor II

What are you trying to do with the GP service?

0 Kudos
RobertMueller_Jr1
New Contributor III

I am trying to calculate geometry on features in a table, much like you would calculate geometry in ArcMap. This operations doesn't have to be a GP but seems to be the only real option in this case. Many users I deal with will never touch ArcMap, so it isn't an option to send them there, nor are they willing to wait for me to do it for them

Everything to date with WAB for measuring lines/polygons has been through the draw tool;

ArcGIS API for JavaScript Sandbox.

0 Kudos
TerryGustafson
Occasional Contributor II

I have used ArcMap and python to create a GP service that calculates offset so I think it would be possible to do what you are wanting to do..

0 Kudos
RobertMueller_Jr1
New Contributor III

Terry - So I thought I would give the GP a try, but instead of calculating geometry (acres) on a field in a table in WAB, I get a whole new export. My steps were;

  • Calculate Field GP on the desired field in ArcMap with expression: !shape.area@acres!
  • Share data and GP as a REST service (output table same as input table)
  • Examine GP REST (Note: the output is "out_data" and type is "GPFeatureRecordSetLayer")
  • Add data REST to new webmap, create new WAB template
  • Add GP REST to WAB GP widget
  • When running GP tool within WAB, the output is a completely new table (as expected based on GP REST)

So, I'm curious how exactly did you do this offset using a GP? By the way - I'm also looking into using the Geometry engine in the ESRI JS API.

0 Kudos
TerryGustafson
Occasional Contributor II

I did a linear offset for routes, what kind of offset are you wanting to perform?

0 Kudos