I have had several instances this happening when I am pulling in a layer from portal or AGOL into my map through the catalog in Pro 2.5 and 2.6. If I set a definition query in the layer properties in the Pro map, geoprocessing tools do not seem to honor it. First time this happened I performed a field calculation on 50 records queried out but it ended up running on all 6,000 records. Is there an environment setting I am missing or has anyone else seen this behavior?
Jason - try this workflow and let's see what happens. Instead of applying a Definition Query on the hosted feature layer (HFL), select by attribute those features you wish to run a GP tool on, right-click on the HFL, select Selection->Make Layer from Selected Features and do your GP work on the selection layer. Is the result the same? Please advise.
I don't see the behavior you described. I selected a hosted feature layer from AGOL, built a Def Query, and ran the buffer tool on the hosted feature layer. Only those features that were screened out by the Def Query had a polygon created for them.
I will try to make a new layer from selected and see what that does, but double checking that I also select the same records that I have queried out has been the failsafe. Two other people in my office have reported the same issue and it has caused some catastrophic data issues especially when running the field calculator processes more records than it was supposed to.
Thx for the update Jason. One thing to note, towards the bottom of the Calculate Field GP tool to the left of the Run button is the "Enable Undo" slider that allows you to undo your field calculation if there is an error. Might be helpful to prevent catastrophic data issues.