"The input has a selection." - slap a clear button in there!

1509
18
11-01-2023 06:47 PM
Status: Implemented
Labels (1)
wayfaringrob
Frequent Contributor

wayfaringrob_0-1698888651373.png

I appreciate this warning banner, and I'd appreciate it even more if it included a clear button right there by refresh. A lot of the time (maybe even most), I don't want to run my tools on a selection. I've added a clear button to my quick access, you can find it on the ribbon somewhere (map view only), and newer versions have a button in the bottom corner, but that only shows up in map view. If you're in a layout, your window's in the way, etc, you're out of luck. Even if you did have the button always visible like I do, a quick button right there would be super useful in many circumstances. Redundancy is not always bad.

Another solution might be to just have a switch to flip off running on the selection - retaining the selection, in case you were doing something else with it.

18 Comments
MErikReedAugusta

Given the screenshots I'm seeing, is that Refresh button going away?

Like Bud, we almost always have Definition Queries active in some of our features that need to stay active.  (Most commonly, Assets that we can't delete from the database for historical reasons but want to effectively treat as deleted in day-to-day operations).

Right now, if I clear the selection the old way, I have to hit that refresh button to get the GP Tool to "see" the rest of the Assets that weren't previously selected.

 

Flipping the toggle flat out won't be an option for us a bunch of the time because it also kills those Definition Queries, so I want to make sure I can at least still keep doing the old way for now.  (Luckily, we're a few versions behind over here, so I might have some time to figure this out).

 

No, we didn't consider this as an alternative. Geoprocessing has had these rules about handling selections first then filters sinceArcMap. We do not want to change this logic since many users may count on getting consistent behaviours.

I also want to note here, that in a way this is actually an inconsistent behavior from before.

Consider a case where I have my boilerplate Definition Query active, and then forgot about having a selection on top of that.  I go to run the tool, and get a lovely warning that I have a selection active.  Oops, I forgot about that!  Okay, let me hit the unselect button in the base UI and then the refresh button on the Tool.  Now the selection is gone, and I have a warning message that a filter is active.  Cool, I want that to stay.  Run the tool!

Under the new toggle, I lose that granularity of control, because it clears both selections and filters together, whereas the old method required clearing those separately.

Reasonable people can likely disagree on whether or not this is a good idea, but I don't see it as consistent, per se.

MargaretCrawford

I would consider a join (matching-only) to be an attribute filter. How do GP tools handle such joins when ignoring attribute filters due to the toggle? Does the join (matching-only) get ignored or is it honoured?

@Bud, That is an intersting point, but currently inner joins (when Keep All Input Records is unchecked) are still honored even if you turn off a selection, highlight or filter.

JonathanNeal

Thank you @MErikReedAugusta glad you brought this up.
Just to clarify one point, the toggle just uses the data path directly, bypassing the layer filters.

MErikReedAugusta

@JonathanNeal That's actually a pretty clever solution/workaround.  Kudos to the programmers for that approach.

However, I still maintain there being a distinct and noticeable difference between filters and selections to the end user—most especially newer ones that understand less of the "nuts & bolts" side of things.  I could likely teach someone enough of the backend of what that toggle's doing to avoid most issues, but it still feels counterintuitive to the average user, for me.

 

ArcMap had a tendency to foul your results if you had a selection and didn't notice.  Adding the warning in Pro was a big leap forward on that note.  Adding the refresh button made it slightly faster to work with that selection without losing too much functionality; also a pretty solid step forward.

This toggle feels like a solid attempt to carry that momentum, but I don't think it properly landed.

MargaretCrawford

@MErikReedAugusta I made a comment addressing your concerns in the new idea post: https://community.esri.com/t5/arcgis-pro-ideas/gp-tools-ignore-selection-but-honor-definition/idc-p/...

We can continue the discussion there 

Bud
by

I wonder if the Use the highlighted records toggle should be removed from the Make Query Table tool.

BUG-000166125: ArcGIS Pro 3.2.2 - Make Query Table Tool joining all tables despite selected records
[I think "tables" in the bug title above is a typo. It should be "rows" or something like that.]
Source: Esri Support Case 03574486 How to join using Make Query Table?

Bud_0-1711038632274.png

How to join using Make Query Table?

Bud
by

@MargaretCrawford 

Interestingly, if there is a selection in a Make Query Table that has a SQL expression, and I disable the selection toggle in a tool like Export Features, the tool doesn't ignore the SQL expression in the Make Query Table layer. I guess that's because the SQL expression in Make Query Table layers is hidden/embedded within the layer; it isn't a definition query.

https://community.esri.com/t5/arcgis-pro-ideas/consistent-visible-sql-expressions-and-query/idc-p/13...

Bud_0-1715137833409.png

I'm not suggesting that's good or bad. Although, from a purist standpoint, I would have considered an SQL expression in a Make Query Table layer to be an attribute filter. But it isn't being treated as an attribute filter in this case.

Video:

ArcGIS Pro 3.3.0; File Geodatabase

 

Edit: Or maybe the toggle just doesn't work at all for the Make Query Table tool. Maybe it doesn't do anything, regardless if it’s enabled or disabled, as suggested in my previous comment.

MargaretCrawford

Hi @Bud,

The toggle on the  tool dialog will not appear when you use a query table as an input,

MargaretCrawford_5-1715182070013.png

unless there is a selection, highlight or filter applied.

MargaretCrawford_4-1715182055958.png

So, for query tables, the query will always be honored by the tool even if you turn off the toggle.

We also discussed this in more detail here: https://community.esri.com/t5/arcgis-pro-ideas/gp-tools-ignore-selection-but-honor-definition/idc-p/...