How to Implement Custom tool Validation for Geoprocessing Widget

09-16-2015 10:11 AM
New Contributor II

I've added a geoprocessing service to the Geoprocessing widget in Web AppBuilder.  Within the GP tool that was authored in ArcGIS Desktop, I have some custom validation logic written using Python, which works fine when running the GP tool in ArcGIS Desktop, but which is ignored when publishing the tool as a GP service and running it via Web AppBuilder's Geoprocessing widget.  The UI for my tool consists of 2 drop-down menus to collect the 2 input parameters from the user.  The parameter validation needs to happen before tool execution, and I need the validation logic to update the values in the 2nd drop-down menu based on the value that the user chooses in the 1st drop-down menu.

It seems that a possible approach to implementing this type of special validation code would entail using the Developer Edition of Web AppBuilder to customize the "Settings UI".  Anyone have experience with this type of client-side parameter validation in Web AppBuilder who would be willing to share some tips with me?  Is this something that would be relatively easy to do, or does it require advanced JavaScript development or experience with the API?  Thanks for any feedback.

11 Replies
New Contributor II

Hi Lance,

I think you can achieve this workflow using a script tool in ArcGIS Pro. Configure Field type parameter and set "Dependency" on the input layer.- inside script tool properties.

Hope this helps.

0 Kudos
Occasional Contributor

Thanks Jyoti. I've tried to get that to work several times. I was hoping someone could confirm that they have actually implemented it!

0 Kudos