Select to view content in your preferred language

Expressions Not Being Honored By The Append Tool

342
1
04-25-2024 06:22 AM
Layth
by
New Contributor II

I am trying to take advantage of the Append tool's "upsert" capabilities to insert or update a parent FC from a child FC.  However I only want to have the "upsert" operation run on a subset of the child features.  I am finding that using the expression parameter doesn't seem to have any effect and the "upsert" operation is run for all features in the child FC.

I am trying to perform this operation in arcpy, but have tested it in Pro (3.2) using the Append tool UI and found the same results.

In the screen shot example provided, you can see I'm using an expression to select a single child FC by OBJECTID to run the "upsert".  However when we look at the results in the second screen shot you can see that the "last edited" timestamp in the parent FC was updated for all 6 records that are in the child FC.  In other words, all 6 features in the child FC were evaluated even though only one should have been.

Is the expression ignored when doing an "upsert" instead of a regular append?

Thanks!

Layth

 

 

1 Reply
RyanKelso
Occasional Contributor III

I have run into this issue as well, trying to update geometry on some features. I tried using as many methods as I could think of to limit the input data to a subset:  an expression within the tool dialog, a definition query on the layer, a selection on the input dataset, and a selection layer. None of these worked.

My workaround is to run Export Features, set the expression in the tool dialog, and output it to the temporary "memory" workspace, then use the temporary feature class with the Append tool. This works but it's an intermediate step that shouldn't be necessary if the tool worked how it's supposed to.