While in an ArcGIS Pro project, I used the Catalog Pane to copy and paste an existing Map (curiously this takes longer than you would think). When I open the new Map, my layers from SQL Server (native, not "SDE") and a layer from a geopackage have the broken link red "!" by the layer name.
When I open the layer's properties and try to set the source, I get a message the query layer must be edited. When I attempt to edit the query, all of the original information is there, but when I am to select a unique ID, no fields are displayed in the selection area and I can not complete the editing.
If I switch maps to the map I just copied, all the layers are displaying fine.
This seems to be a bug in the copy/paste of a map. But why can I not set the ID when editing the layer?
I'm using ArcGIS Pro 2.9.1.
Edit Query is correct, unique ID field is "GID"
No fields are displaying in the selector, and I can not complete the edit.
Let's test something - can you copy/paste the query layer to a new map view in ArcGIS Pro vs. copy/paste the entire Map View to a new Map View? Does the query layer behave normally? Agree this might be a bug.
Yes, I can copy/paste a layer from the original Map View into the new Map View (that I did the copy/paste) and it works fine.
If I modify the fields in the first pane (screen shot about) to do something like "GID as GID" then I can hit the "validate" button and move to the next pane (second screen shot) and the field is available to be checked as the unique ID, this does work and let's me "Finish" successfully. BUT, it then resets the symbology for that layer (which I find super crazy...but I get it, what if I changed a field the symbology was based on).
So, copy/paste a layer works, but copy/paste a Map View loses query layer parameters.
Modifying the query of the query layer allows me to get the layer working again, but loses the symbology.