Result of FeatureTable.QueryFeaturesAsync does not contain features that are in the HTTP response

233
2
Jump to solution
09-12-2018 10:31 AM
Highlighted
New Contributor

Hi,

I'm calling

ServiceFeatureTable.QueryFeaturesAsync(parameters, queryFeatureFields, cancellationToken)‍‍‍

on a feature service table, with the where clause set to GUIDFIELD='value'. The resulting FeatureQueryResult contains a field collection but does not contain any features.

However, I can see from monitoring the web requests via Fiddler that the HTTP response to the request contains two feature results. Presumably these are not being parsed by the ArcGISRuntime for some reason which is why they aren't in the FeatureQueryResult object.

Has anyone else experienced this or know of a possible workaround? The JSON response is attached (with personal details scrubbed out).

Edit: It seems that if I set the where clause to "1=1" instead of the above statement, then the FeatureQueryResult does contain features. "OBJECTID='1'" also works. So bizarrely it seems like the function only doesn't work when the where clause is matching a field value on an esriFieldTypeGUID field.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Frequent Contributor

I am not able to reproduce with this but I recall there's an issue if guid were in lowercase.

This seem to be related

Can you try this?

var table = new ServiceFeatureTable(new Uri("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Notes/FeatureServer/0"));
var result = await table.QueryFeaturesAsync(new QueryParameters() { WhereClause = "globalid = '{5D6BCAA4-D57A-4C97-820F-6E3B5E040CE9}'" }, QueryFeatureFields.LoadAll);c‍‍

View solution in original post

Reply
0 Kudos
2 Replies
Highlighted
Frequent Contributor

I am not able to reproduce with this but I recall there's an issue if guid were in lowercase.

This seem to be related

Can you try this?

var table = new ServiceFeatureTable(new Uri("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Notes/FeatureServer/0"));
var result = await table.QueryFeaturesAsync(new QueryParameters() { WhereClause = "globalid = '{5D6BCAA4-D57A-4C97-820F-6E3B5E040CE9}'" }, QueryFeatureFields.LoadAll);c‍‍

View solution in original post

Reply
0 Kudos
Highlighted
New Contributor

Thank you, Jennifer. It appears that the format of the where clause I was using was incorrect for the GUID field.

I was doing this:

"GLOBALID = '5D6BCAA4-D57A-4C97-820F-6E3B5E040CE9'"

Using curly brackets and changing the GUID to uppercase correctly resulted in returned feature objects. (Although I still find it misleading that this format returns a response from the server with the features in it but not when using the ArcGIS Runtime.)

Reply
0 Kudos