Finding relationship class records in WPF

406
2
Jump to solution
12-28-2012 02:17 AM
Labels (1)
PaulLivingstone
New Contributor III
I am using a LocalMapService in WPF and c# and calling QueryTask to find features that match a specific criteria.
How can you also find the relationship class records associated with the features?
I see that QueryTask has the ExecuteRelationshipQueryAsync method but presumably you would need to know the relationship in the first place.

Thanks
Paul
0 Kudos
1 Solution

Accepted Solutions
RuiShen
New Contributor III
If you want to check the relationships of a featurelayer, you can get to featureLayer.LayerInfo.Relationships.
It will list all the relationships on this featureLayer.

Check the Relationship class below:
http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...

View solution in original post

0 Kudos
2 Replies
RuiShen
New Contributor III
If you want to check the relationships of a featurelayer, you can get to featureLayer.LayerInfo.Relationships.
It will list all the relationships on this featureLayer.

Check the Relationship class below:
http://resources.arcgis.com/en/help/runtime-wpf/apiref/index.html?ESRI.ArcGIS.Client~ESRI.ArcGIS.Cli...
0 Kudos
PaulLivingstone
New Contributor III
Thanks Rui

This worked great.

For others looking at this thread it should be noted that as I was using a local map package (opposed to an online map service) I had to include the relationship tables in the mxd that I used to create the package otherwise they are not included in the package. If they are not included in the package then they do not appear as relationships when the feature layer is initialised.
0 Kudos