Select to view content in your preferred language

GP Tools — Ignore selection but honor definition query

1340
12
12-21-2023 10:15 AM
Status: Open
Labels (1)
Bud
by
Honored Contributor

ArcGIS Pro 3.2.1:

There's a new toggle in geoprocessing tools that lets us choose to use the highlighted/selected records (toggle enabled) or all records (toggle disabled).

Bud_0-1703181967483.png


Disabling that toggle means the tool will
 ignore filters on the layer (definition query, time filter, range filter [and a selection layer's "selection definition set"]). 

I would like to have the option of ignoring the selection, but honoring filters (like a definition query). I have standard definition queries that I apply to almost all FCs/tables, such as STATUS=ACTIVE. It wouldn't make sense to ignore those definition queries in GP tools just because I have a selection.


The enhanced functionality could look something like this:  If the selection toggle is disabled, then provide an option to honor filters: yes/no.

Related: Original Idea - "The input has a selection." - slap a clear button in there!

12 Comments
Bud
by

From @MitchHolley1 in Field Calculate 'Use the selected records' Does Not Honor Selection Layers When Disabled:

...Since this [selection] layer is a different layer in the map (yes, they are "pointing" to the same data) my opinion is this behavior shouldn't happen.  This makes working with subsets of data extremely difficult and confusing. If I wanted to work with the non-selection dataset, I would use the drop-down in the Calculate Field tool to do so, but that is not my intention.

The 'Source' tab of the layer properties also says this:

Bud_1-1708581666530.png

I do not want to access all the features in the source data, and that is why the 'Clear selected features to access all features in the source data' radio button in the Selection properties is unchecked.  By default, this is unchecked.  I shouldn't be able to access ALL features in the source data unless I explicitly tell the software to do so.

ArcGIS Pro - Selection layers

Bud
by

@MargaretCrawford 

you could try using query layers if you would like your query to always be honored by the tool

Also: https://community.esri.com/t5/arcgis-pro-ideas/quot-the-input-has-a-selection-quot-slap-a-clear/idc-... 

Query layers and query tables would only be used if the user never edits the data, which isn't normally the case. Typically, we work with FCs and tables directly in the map and edit them as needed. So, we want attribute filters like definition queries (such as STATUS=ACTIVE) to be honored in GP tools, even if the user disables the selection toggle.

And of course, for GP tools that modify data like Calculate Field, we wouldn't use query layers or query tables.