How to search by GlobalID column in Feature Layer in Mobile Cache? -Runtime SDK 10.2

3509
1
02-24-2014 06:21 AM
ZoltanSugar
New Contributor
SDK: ArcGIS Runtime SDK for Windows Mobile 10.2
Platform: Windows 7

I can search the mobile cache feature layer by any column except the GlobalID.

Why important:
SDK does not support relationship classes.
Using Feature Layers as tables. Need to manually link tables with GlobalID (unique to all clients)
as a workaround.

Thank you for any help in advance.
0 Kudos
1 Reply
AkhilParujanwala
New Contributor III
Hi,

I'm still using ArcGIS Mobile 10.0.

I think I may have the solution:

//Get the layer you want
FeatureLayer featureLayer = MobileApplication.Current.Project.FindFeatureLayer("Clients");

//Get the data table and then read it
FeatureDataTable fDataTable = featureLayer.GetDataTable();

using(FeatureDataReader fDataReader = featureLayer.GetDataReader())
{
int globalIdIndex = fDataReader.GlobalIdColumnIndex;
fDataReader.GetValue(globalIdIndex);  // here you will get the value of the Global ID, I have not tried it but it may work.
}


I know the globalIdIndex value is inside the loop you can take it out and keep the variable outside the loop.

I hope this helps, let us know if this works.
0 Kudos