In #ArcGISPro 2.0.1 Field calculator applies the value on ALL features and not only SELECTION. The same operation worked perfectly with the same data in the same FGDB in ArcMap.
GP Tools — Ignore selection but honor definition query
This should be improved in ArcGIS Pro 2.4 when it releases. The issue was that right-clicking a field header in Example:2 launched the Calculate Field tool but did not populate the Input Table correctly (it incorrectly populated with Example:1). I realize that there may be use cases for having layers with the same name, but even with the future fix for this, it is still recommended to provide unique layer names.
Thanks, Wright. I'll notify the team to take another look at this.
Just a heads up: after upgrading to ArcGIS Pro 2.3.0, I have found that the issue I documented earlier in this thread (Jul 22, 2018 10:49 AM) still exists. When a user opens the calculate field geoprocessing tool by right-clicking on a field name in the attribute table and selecting "Calculate Field", the "Input Table" defaults to the first instance of the two identically-named feature layers. This happens regardless of the table used to open the field calculator tool (e.g., opening Calculate Field from Layer:2 attribute table still defaults to Layer:1 in the geoprocessing tool).
It would help to have continuity between the geoprocessing input table name + suffix number and the layer name/attribute table name. So if two layers are named Example, the attribute table for Example layer 1 (by hierarchy in the Contents pane) would be named "Example:1" and the attribute table for copy 2 would be named "Example:2".
Here's what I see on support.esri.com
We had the same bug (selection not respected with Calculate Field) because of same layer names loaded (fc from a FGDB).
Kory Kramer Is this a known bug at Esri?
Is there any development on a simple toggle button for selected or all features?
Had the same bug (selection not respected with Calculate Field) but not because I had the same layer loaded more than once. On my side, it looks more because it is a Feature Layer from AGOL,created from Survey123. From my experience, Pro has numerous functions that are not supported with these feature layers
This is a known issue when more than one layer has the same name in the Contents pane which is why the statement "aliases don't seem to matter" is critical. I cannot reproduce this when the layer names are different.
Let me walk you through my testing:
In the screenshot below, I want to calculate the subtype for record 3. I right-click the subtype field > Calculate Field
Then for some reason I decide that I want to calculate record 1 to equal Medium (subtype 2) in my other table, for the other layer, so in the tool, I switch to points:2, and calculate to = 2.
Nothing happens – well, nothing appears to happen but what actually happened was that record 3 in points:1 already equals 2 so it was calculated to the same value:
This seems to be because the tool is still referencing the selection from the first layer on the left.
Because even though I’m now referencing points:2 in the tool, and record 1 is selected, if I now set that to equal 1 (should change record 1 to Small in the right-hand attribute table) it calculates it for points:1
This is the scenario that we know about. I haven’t seen this happen when the layers are actually named differently.
Please either provide a reproducible case with step-by-step instructions and screenshots like above where you have different layer names, or open a case with technical support to fully investigate and report the issue. Thank you!
Interesting find. I have never used multiple copies of the same featureclass in the same map before. PRO is probably getting confused, or perhaps taking the first incarnation that it finds in the Table of Contents rather than the selected and delimited one.
It occurs when multiple copies of the same source feature class are in the map. Aliases don't seem to matter.
Are we talking duplicate layer names or two differently named layers that reference the same gdb dataset?
Recently, I had the same problem in AGP 2.1. Here's what I found:
Calculate Field ignored the selection parameters when calculating a field in a feature class that was included multiple times in the map. Once I removed the copies of the feature class, Calculate Field worked as expected (calculated only the selected features). Hope this helps, and hope ESRI documents/fixes this!
Hi Dan,
I can't find the reason but I retried it and now it's working! It applies only to selected features. I posted it on ArcGIS Ideas anyways and will return to this post if it repeats again.
Thanks for your answer
That hasn't been my experience. Do you have an image of running the calculate field when the table is open with records selected to demonstrate? It is a file geodatabase table I presume? or is it some other form of table?
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.