I am following the instructions in ESRI's Inspection Workflows YouTube video series. I am using ArcGIS Pro 2.9 and Enterprise Portal 10.9. My 'Join Features' layer is functioning correctly in the webmap, but will not load in Field Maps, with the following error:
Map: Hydrant Inspections Webmap
Layer: Recent_Hydrant_Inspections
Domain: ARCGIS_RUNTIME
Code: 3047
Description: Geodatabase duplicate field not allowed.
The issue is that both the feature layer (Hydrants) and related table (Inspections) contain a GlobalID field. When I perform a Join Features (so we can symbolize on most recent inspection), the resulting layer contains two GlobalID fields named 'globalid' and 'globalid_1649266887779'. I can't find any way to remove one of these fields or resolve the issue.
How is it possible to view a 'Join Features' layer in Field Maps? Why did it work in Eric's demo but not in my environment?
This is still relevant - I am running into the same problem trying to set up an inspection workflow in ArcGIS Enterprise 11.1.
It seems to me that if you don't need offline capabilities you can set up your related tables without a GlobalID field to avoid this error. But if your workflow requires the related tables to be part of an Offline Map Area in FieldMap then the GlobalIDs are required and you can't add a Joined Hosted Feature Layer View to the Fieldmap because of the mentioned BUG.
Edit: GlobalIDs are also required for Synchronization capabilities
I just posted a workaround. Regards
Sorry to see so many others having this issue still. We recently updated to enterprise 11.3 and the issue is not resolved, and the bug is still 'Under Consideration'. I'm hopeful that taking the entire dataset out of hosted feature layers and into an enterprise gdb with views will let me get the functionality. I will report back if I ever get something working. In the meantime, here's an very stripped down example script you can run to populate a recent inspection date field in the hosted feature layer.
import arcpy
# sign into portal
arcpy.SignInToPortal(r"https://portalURL",'username', 'password')
arcpy.env.addOutputsToMap = False
# Load in related table
related_table = arcpy.management.MakeTableView(r"URL-to-rest-services/FeatureServer/1",'related_table')
# Loop through and populate dictionaries of most recent inspection date
# Update inspectiondate field name as needed
d_recent = {}
with arcpy.da.SearchCursor(related_table,['globalid','inspectiondate'],sql_clause=(None, "ORDER BY inspectiondate DESC")) as cursor:
for row in cursor:
# add to dict for most recent insp only
if row[0] not in d_recent.keys():
d_recent[row[0]] = row[1]
# get only features that have related records
guids = list(d_recent.keys())
query = "GlobalID IN ({:s})".format(','.join(f"'{x}'" for x in guids))
features = arcpy.management.MakeFeatureLayer(r"URL-to-rest-services/FeatureServer/0",'features',query)
# loop through and update
with arcpy.da.UpdateCursor(features,['globalid','recent_insp_date']) as cursor:
for row in cursor:
if row[1] != d_recent[row[0]]:
print('Feature {} recently inspected on {}'.format(row[0],d_recent[row[0]]))
row[1] = d_recent[row[0]]
cursor.updateRow(row)
It is odd to me that this is still an issue with no straightforward workaround years later. How are other agencies able to create a survey that requires a one to many relationship where Supports applyEdits with GlobalIDs' is True (i.e. literally any dataset that needs routine inspection or maintenance....trees, catch basins, storm ponds, outfalls, etc etc etc etc)?
Am I missing something? Isn't this a basic necessity for any business/government conducting repeated surveys on static features?
Had a support call in which I was told there wasn't a way around it, but that it doesn't appear to be an issue in ArcGIS Online. For the amount we pay for Enterprise, this functionality should be one of the more basic requirements.
I just posted a workaround. Regards
I am also running into this problem and I would like to find a solution. I had everything working with AGOL however after switching to Enterprise I am now receiving the error message:
Domain: com.esri.arcgis.runtime.error Code: 3047 Description: Geodatabase duplicate field not allowed.
I just posted a workaround. Regards
I reported this bug two years ago in version 10.9. and it is frustrating that in 11.3 this bug is still present.
Thank you @Bertodiem for this workaround! I haven't deployed it with my main app yet, but it did work in my testing environment. To clarify what you said for others who may have less experience using this approach:
{
"fields":[
{
"visible":false,
"name":"globalid_1649266887779"
}
]
}
Note that if you are using this globalid field for other applications (e.g., a dashboard where you use this field to count unique entries), it might break something, I haven't looked into that yet.