Select to view content in your preferred language

Field Calculate 'Use the selected records' Does Not Honor Selection Layers When Disabled

1211
8
Jump to solution
02-21-2024 01:38 PM
MitchHolley1
MVP Regular Contributor

I was calculating some rows on a hosted feature service in ArcGIS Pro 3.2 and noticed something weird.  I made a Selection Layer by selecting 100 rows from the hosted feature service attribute table, right-clicked the layer in the Contents Pane and clicked 'Make Layer from Selected Features'.  From there I opened the attribute table of the selection layer, selected some rows, right-clicked a field and opened 'Field Calculate', disabled the 'Use the selected records:' slider, and ran the tool.  The tool then calculates the value for that field for the ENTIRE hosted feature service layer, and doesn't honor the Selection Layer found in the map.

 

Has anyone else had this issue?  Is this the intended functionality?

MitchHolley1_0-1708551394498.png

 

1 Solution

Accepted Solutions
MitchHolley1
MVP Regular Contributor

FYI @Bud - ESRI has logged this issue as a bug.

View solution in original post

0 Kudos
8 Replies
Bud
by
Esteemed Contributor

I was able to reproduce that behavior with a selection layer on a file geodatabase FC in ArcGIS Pro 3.2.2.

I wonder if the selection layer's selection definition set is considered to be an attribute filter. When the Use the selected records toggle is disabled, the GP tool will ignore all attribute filters (definition query,  time filter, range filter).

Bud_0-1708574105645.png

There is a discussion about the toggle behavior here: 
Idea: GP Tools — Ignore selection but honor definition query

MitchHolley1
MVP Regular Contributor

Thanks for the reply, Bud.  Since this 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:

MitchHolley1_0-1708576895339.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.

 

Bud
by
Esteemed Contributor

On a side note, regarding:

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.

What drop-down are you referring to? The Input Table drop-down?

0 Kudos
MitchHolley1
MVP Regular Contributor

Yes, the Input Table drop-down.

MitchHolley1
MVP Regular Contributor

FYI @Bud - ESRI has logged this issue as a bug.

0 Kudos
Bud
by
Esteemed Contributor

Thanks! Do you happen to have the bug number?

0 Kudos
andreamangeruca
Emerging Contributor

I have the same problem on geoprocessing tool. Even though I flagged "only selected" it apply the geoprocessing to the whole feature class.

I'm working on Arcgis Pro 3.2.2.

Any news?

0 Kudos
Bud
by
Esteemed Contributor

What geoprocessing tool are you using?

Possibly related: 

BUG-000166125: ArcGIS Pro 3.2.2 - Make Query Table Tool joining all tables despite selected records

0 Kudos