Select to view content in your preferred language

ArcGIS Runtime SDK .Net ServiceFeatureTable technical issue

1765
7
09-10-2018 07:45 AM
LY90
by
Emerging Contributor

Currently our team is encountering a technical issue which occurs by using the ArcGIS Runtime SDK .Net.

Based on our experience, In ArcGIS Runtime SDK, Esir.ArcGISRuntime.Data, ServiceFeatureTable Class; the AddFeatureAsync() method would add the new features to the ServiceFeatureTable locally and the ApplyEditsAsync() method would commit the changes that are made to the FeatureTable locally, then talk to the server and update them.

We noticed that there are two sets of GlobalIDs being added throughout the above process. AddFeatureAsync() would generate a set of GlobalID and ApplyEditsAsync() would generate another set, the one that generated by the ApplyEditsAsync() are the ones being used from the ArcGIS Online.

Our Question: Is there a way to allow us to add GlobalIDs manually by ourselves before adding the features to the service feature table? Or is there are way to allow us preserve the GlobalID field that are generated from the AddFeatureAsync() so that they wouldn’t be overwritten by the ones generated by ApplyEditsAsync()?

 

 

Your time is much appreciated!

Tags (1)
0 Kudos
7 Replies
dotMorten_esri
Esri Notable Contributor

I believe you should be able to just set the GlobalID field yourself before calling Add (just use Guid.NewGuid())

0 Kudos
LY90
by
Emerging Contributor

Hi Morten, thanks for the reply! I tried to add it myself but the GlobalID would get overwritten by the ApplyEditAsync(). I there a way to retain the field? 

0 Kudos
dotMorten_esri
Esri Notable Contributor

Does the feature service metadata specify "supportsApplyEditsWithGlobalIds" as true or false? (it should be true, but is false with versioned data)

See Layer (Feature Service)—ArcGIS REST API: Services Directory | ArcGIS for Developers  for a description of this property

0 Kudos
LY90
by
Emerging Contributor

Thanks for the message Morten, we tried that as well, will be set to false automatically. 

Our team has decided to query the rest endpoint directly and abandon the servicefeaturetable class methods at this point. Thanks for all your input though! 

0 Kudos
dotMorten_esri
Esri Notable Contributor

After some more digging, this looks like a bug, and we'll address it. However I doubt this'll make it for the Update 4 release.

For now you can call the "RefreshObjectId()" on the ArcGISFeature instance, and it should update the feature instance with the server-side applied global id. That way you can at least track what it was changed to.

LY90
by
Emerging Contributor

Thanks Morten, I will give the refreshObjectID() a try later! 

0 Kudos
MaximilianGlas
Esri Contributor

Morten Nielsen‌ We still have this problem with actual version of ArcGIS Runtime 100.5.

Is this bug still open?

0 Kudos