AnsweredAssumed Answered

Incorrect ParentGlobalID Query Results, Bizarre

Question asked by dbecker88 on Nov 28, 2018

Survey123 form with a repeat, using GlobalID and ParentGlobalID Primary/Foreign keys respectively.

Dumped the S123 feature service from Portal to a FGDB, displayed FGDB in latest ver of ArcGIS Pro.

 

In ArcGIS Pro, I randomly choose a GlobalID in table1, then ran an attribute query on table2 where:

parentglobalid = '{0E84E4E8-01A3-4E2F-9149-AA7C1DE0FBE7}'

However, I got all different parentglobalid values, around 10 different values in addition to the one I was actually searching for. What also crazy is that the same query results are also returned in arcpy 10.6.1.

q = "parentglobalid = '" + str(row[9]) + "'"  #query to select this globalid from table2  

arcpy.SelectLayerByAttribute_management(species,"NEW_SELECTION",q) #only select this globalid

The only solution I could come up with is to convert the parentglobalid (guid type) to string. The expected query results were then returned.

q = "txt_parent_gid = '" + str(row[9]) + "'"  #query to select this globalid from table2

arcpy.SelectLayerByAttribute_management(species,"NEW_SELECTION",q) #only select this globalid

Has anyone ever seen this before, esp. with both a manual attribute query in ArcGIS Pro and arcpy module? Strange.

It also doesn't happen for every GlobalID that you search for. Out of 900 or so unique GlobalID values, I would say incorrect parentglobalID values only occur on 10% of the values. Again, very strange.

Outcomes