Select to view content in your preferred language

Database Trigger / Simple Geoprocessing Widget - Calculate Fields

2759
1
02-01-2012 05:07 AM
KarlWilson
Frequent Contributor
What I'm trying to acheive is a way of automatically updating a field once a layer has been created or modified. Specifically, when a user creates a polygon (using the Edit widget) I want a field called "area_ac" to automatically populate with the area of that polygon in acres.

Is there a way of doing this?

I figured that a manual way of updating the "area_ac" field would be to create a very simple Geoprocessing service that uses the Calculate Field tool, and then use the Geoprocessing widget to run it.

I tried setting up an xml config for the Geoprocessing widget, but I don't think it likes the fact that there are no inputs or outputs associated with the service. When I press the submit button on the widget I get an error:
Problem
esriJobFailed
Failed.


Is it possible to run the Geoprocessing widget without inputs or outputs?

GeoprocessingWidget_CalculateAreas.xml
<configuration label="Calculate Areas">
    <taskurl>http://SERVER/ArcGIS/rest/services/GP/viewer/GPServer/Calculate_Acres</taskurl>
    <layerorder></layerorder>
</configuration>
Tags (2)
0 Kudos
1 Reply
Scottschrader
Deactivated User
Kwgis,

Did you find a method to run the calculate field tool on one record via a geoprocessing service?  I would like to build a mobile app that takes user inputs of soil characteristics and then auto populates a field as to the soil capability class and subclass.  Any guides or instructions that you have found to be helpful would be appreciated.


Thanks,
Scott


What I'm trying to acheive is a way of automatically updating a field once a layer has been created or modified. Specifically, when a user creates a polygon (using the Edit widget) I want a field called "area_ac" to automatically populate with the area of that polygon in acres.

Is there a way of doing this?

I figured that a manual way of updating the "area_ac" field would be to create a very simple Geoprocessing service that uses the Calculate Field tool, and then use the Geoprocessing widget to run it.

I tried setting up an xml config for the Geoprocessing widget, but I don't think it likes the fact that there are no inputs or outputs associated with the service. When I press the submit button on the widget I get an error:
Problem
esriJobFailed
Failed.


Is it possible to run the Geoprocessing widget without inputs or outputs?

GeoprocessingWidget_CalculateAreas.xml
<configuration label="Calculate Areas">
    <taskurl>http://SERVER/ArcGIS/rest/services/GP/viewer/GPServer/Calculate_Acres</taskurl>
    <layerorder></layerorder>
</configuration>
0 Kudos