Select to view content in your preferred language

Indicate in the map that a "selection of zero records" is applied

900
9
12-21-2023 09:19 AM
Status: Open
Labels (1)
Bud
by
Honored Contributor

ArcGIS Pro 3.2.1 (ArcMap doesn't seem to behave this way)

 
"When applying a selection or filter, a selection of zero records can result. For example, selecting a value that is not present in the attribute field results in a selection of zero records. A geoprocessing tool that uses the layer as input will use no records from the input. This case is typically accompanied by a warning indicating that the input or output is empty."
That applies even if the "Show Selected Records [Only]" in the attribute table option isn't used.
 
Thoughts:
 
That behaviour is surprising to me. I would have thought if no records were selected, then the selection wouldn't be honoured (or the selection wouldn't exist). But that's not the case. 
Although, I think I understand why it was designed that way. It would be equally surprising to accidently utilize all records, if you were expecting your selection to only return a subset of records.
 
I'm aware that GP tools indicate the following: "Use the filtered records: 0". And as the docs suggest, "This case is typically accompanied by a warning indicating that the input or output is empty." Screenshot of the GP output message.
However, this is such a special case, that I'm wondering if more can be done in the map to make it clearer to users that a selection of zero records is currently applied.
 
Idea:
 
Make it more obvious in the map that a selection of zero records is currently applied. When looking at the usual indicators in the attribute table or in the map tab, it isn't obvious that a selection is applied.
 
Bud_0-1703178720427.png


While the GP tool does indicate it, I wonder if there are other use cases where we would have no way of knowing that a selection was applied, such as Python scripting.

Edit: To be clear, "0 of 4 selected" in the attribute table, and "0" at the bottom right corner of the map tab don't necessarily tell us that a selection of zero records has been applied. "0 of 4 selected" and "0" could be true if there isn't a selection applied, which is an entirely different scenario.

And I hinted at this earlier, but I'l clarify: The Clear buttons in the attribute table and in the bottom-right corner of the map tab are greyed out, which would suggest that a selection is not applied. But that's not the case, a selection has been applied. The fact that those Clear buttons are greyed out is inconsistent with the Clear buttons in the ribbon and in the Contents Pane —> Selection tab. The latter buttons are not greyed out, which paints a confusing picture for the user.

 

Related: Attributes Pane — Update common field in multiple FCs using single action

Tags (2)
9 Comments
JonathanNeal

@Bud On the contents pane click the Selection toggle to see the count on each layer.
Also, the Table and Map views will give a count.

For clarity, are you thinking a contextual ribbon tab called Selection?

JonathanNeal_0-1703179812821.png

 

Bud
by

@JonathanNeal 

Thanks for pointing out the Selection tab in the Contents Pane.

I don't know exactly what the ideal solution would be in terms of clearly indicating that there is a "Selection of zero records" in the map.

Related: Esri Case #03514864 Selection of zero records: Clear selection button in Attribute Table is unavailable

 

Bud
by
MErikReedAugusta

@JonathanNeal 

I see two issues here, personally:

Issue 1 - Inconsistent behavior between the various buttons

I just checked, and Bud's right, and this is something I've never noticed.

Steps:

  1. Select by Attribute
  2. Search for a value that doesn't exist in the data.  I looked for "foo" in a StructureType column.
  3. Result is a NULL selection (which I didn't know was possible)

Confirmation (with NULL selection active):

  1. Map View UI
    1. Clear button greyed-out
    2. Indicates 0 selected
    3. MErikReedAugusta_2-1703783025364.png
  2. Attribute Table
    1. Clear button greyed-out
    2. Indicates 0 selected
    3. MErikReedAugusta_3-1703783034473.png
  3. Contents Pane, Selection Tab
    1. No selections mentioned at all
    2. MErikReedAugusta_5-1703783080435.png
  4. GP Tool, Table to Excel
    1. Indicates NULL selection is active
    2. MErikReedAugusta_6-1703783134456.png
  5. Map Ribbon, Selection Group
    1. Clear button is not greyed-out
    2. MErikReedAugusta_4-1703783046380.png

Essentially, items 1-3 indicate that I have NO selection active.  Items 4 & 5 indicate that there IS a selection active, but it's EMPTY/NULL.

Which brings me to:

Issue 2 - There is a distinction between a NULL selection and NO selection.

  1. NULL selection
    • There's a selection active, but it contains no records.
  2. NO selection
    • There's no selection active at all

 

This behavior is so confusing that I honestly wonder if this is intentional or if it's (at least partly) a bug.

MErikReedAugusta

For clarity, I also had a definition query active when I was pulling those screenshots, but I just confirmed that the behavior is identical with that definition query turned off.

Bud
by

Regarding @MErikReedAugusta‘s point #3:

As mentioned in Esri Case #03514864; ArcGIS Pro 3.2.1; Mobile Geodatabase:

 

Under normal circumstances, a selection of zero records is shown in the Contents Pane —> Selection tab:
 
Screenshot:
Bud_0-1703858137669.png
 
However, that doesn't work properly when ArcGIS Pro is first opened in a new session. It only works after a proper selection that selects at least one record has been performed. Then a subsequent selection of zero records will be displayed in the Contents Pane —> Selection tab.
 
Is that an additional bug? "Selection of zero records is not displayed in Contents Pane Selection tab in new ArcGIS Pro session."


Video:

Bud
by

It would also be good if the attribute table made it crystal clear if a selection is applied. For example, at the bottom where it says “0 of 3 selected”, change that text to “0 of 3 selected (selection applied)”. Or something better.

Bud
by

BUG-000164132: The 'Clear' button under the Contents pane selection tab is missing when selecting zero records in ArcGIS Pro

BUG-000164133: The clear button is grayed out when selecting zero records and ensure consistent behavior for the clear button in ArcGIS Pro

Bud
by

@JonathanNeal 

If you are considering adding a "contextual tab to the ribbon called Selection", then you could also consider including this functionality: Save a Selection Set.