ArcGIS Pro 3.1.1; mobile geodatabase
Background: Using a query layer or database view as a workaround for Promote selected records.
I have a FC in a mobile geodatabase. I want to create a query that can serve as a dynamic SQL flag field in the attribute table of the FC.
--active_transportation_nt_flag_vw
select
objectid,
case when type='NT' then 1 end as flag
from
active_transportation
Since query layers aren't supported for mobile geodatabases, I'll create a database view instead.
- Add the FC to the map.
- Create a database view using the above SQL.
- Add the database view to the map.
- In the attribute table of the FC, create a join from the FC to the view. Linked by the OBJECTID in the FC and the view.
- In the FC attribute table, move the FLAG field from the joined view to the leftmost side of the attribute table (for easy viewing).
- Sort the FLAG field descending.
Video:
Bug #1:
Sorting the joined view (descending) doesn't work on the first try. The sort had no effect; the field remains unsorted. It only works on the second try.
Bug #2:
Removing the join doesn't work (via the hamburger menu —> Joins and Relates —> Remove Join). It doesn't remove the join on the second try either. Sometimes it works on the third try. Or sometimes removing all joins works.
Is that buggy behavior a known issue? I've observed similar (but different) buggy behavior in the following setup as well: ArcGIS Pro 2.6.8 Oracle 18c 10.7.1 EGDB SDE.ST_GEOMETRY (on a different computer than the above mobile geodatabase test).
It's a shame that joining a FC to a SQL query/view so buggy in the attribute table. See the "Existing mechanisms aren’t suitable" section in Virtual Attributes (ad hoc).