Problem: Unable to perform queryFilter tasks with GlobalID


Performing a queryFilter task with GlobalID in ArcGIS Runtime SDK for .NET fails, and any linkage between features is not established. The following is an example of a failed queryFilter task:

qF.WhereClause = "GlobalID='{DCD212BC-9D7C-48B5-97FD-BBA9454BFBFA}'"


The problem lies in the correlation of the GlobalID and Globally Unique Identifier (GUID). GlobalID values are automatically generated when records are added to the table. These values are stored using an uppercase string representation. However, when runtime content is published, the returned GlobalID is in the System.GUID format, and the Guid.ToString method stores the values in lowercase by default. This is a Microsoft MSDN design wherein the value of the GUID is represented as a series of lowercase hexadecimal digits.

This behavior leads to conflicts in ArcMap when relating the GlobalID and GUID columns, as both values are compared in string format, which is case sensitive (for example, in ArcMap, the GUID value {EF2E0C18-638C-4C6D-AFA7-4D23581CCAA5} is not the same as {ef2e0c18-638c-4c6d-afa7-4d23581ccaa5}).

Solution or Workaround

Use one of the following suggested solutions to complete the queryFilter task:

Related Information