Thank you for posting this question. Can you explain a bit more about what to expect in the return value for PopulateFromServiceAsync vs QueryFeaturesAsync if the feature layer that I'm querying from doesn't have an Object ID field defined?
In my situation (using ArcGIS Runtime 100.7), I have created two ServiceFeatureTable objects, each set to ManualCache request mode and pointing to a couple of different feature layers on ArcGIS server. I'm using these to periodically poll for data. I'm seeing different behavior between the two, and I think it has to do with the presence (or lack of) an Object ID field.
The first layer has an object ID field, and PopulateFromServiceAsync returns the results as expected.
The second layer does not have an object ID field, and PopulateFromServiceAsync returns no results, even though I know there are results on the server. However, QueryFeaturesAsync correctly returns the results I was expecting, but ONLY IF I call PopulateFromServiceAsync first. Not sure if it makes any difference, but I have the clearCache parameter set to true on the call to PopulateFromServiceAsync.
It seems like internally the ServiceFeatureTable is populating the data, but isn't returning those results if the layer doesn't have an Object Id field defined. This was what threw me off.
My solution was to call PopulateFromServiceAsync, then do a check to see if the ServiceFeatureTable.ObjectIdField is blank, and if so, call QueryFeaturesAsync to get the data in the table.
Does this seem like a good approach (in lieu of the ideal solution of adding an Object Id field)?
Thanks.