Hard code a Definition Query clause when using Tasks in Pro

08-18-2017 06:04 AM
Status: In Product Plan
Labels (1)
by Anonymous User
Not applicable

Currently there is no way to set up a definition query as a task step in ArcGIS Pro with a predefined/hard coded SQL clause or even pass the SQL clause as a parameter. It would be extremely helpful when using Tasks in ArcGIS Pro if there was a way to set up a Feature Layer Definition Query as a task step and hard code the SQL clause so it is passed into the into the Definition Query automatically - minimizing the chance for error on the users part.  

The ability to set up Task has been very helpful for our workflow, especially when it comes to our "less knowledgeable" GIS users who aren't completely familiar with how certain GIS tools work.  However, relying on them to correctly enter the SQL code again and again when running a Task has opened up opportunities for them to incorrectly set up the SQL clause due to fat-finger or syntax errors.

It would be beneficial to either "hard code" the SQL clause within the task step setup in the tool OR pass the SQL statement as a parameter.  

arcgispro‌ arcgis pro 2‌ task designer‌ tasks‌ 


Hello Noelle,

Thanks for the wonderful idea.

Would the definition query be applied to:

  1. A single layer
  2. All layers
  3. Subset of layers
  4. All of the above



by Anonymous User


First I think it would be helpful just to have the definition query available for a single feature layer.  Though I do see the benefits of your other options as well.  

Thanks for considering!


I agree with this idea 100%. I am currently trying to model QC workflows in Tasks but all of these workflows start with filtering datasets via definition queries and this is not something I can do in Tasks. I would be able to use Tasks much more in my work if I could set and/or clear the definition query as part of a command in a step.

I am currently working around this by creating a multi-value choice list (Python script tool) and inserting that into a GP model. The Python script takes the user input from the multi-value choice list, generates the definition query syntax, and applies it to the layers specified also within the Python code. I am using Python to do things that I think should be options in Tasks. 


Status changed to: In Product Plan