queryRelatedFeatures

610
2
10-16-2018 07:31 PM
MarkHolm
New Contributor II

I am trying to query related features but get all attributes. Getting all attributes means I need to use queryRelatedFeaturesWithFieldOptions instead of queryRelatedFeatures. Is there a way for queryRelatedFeaturesWithFieldOptions to query all relationships? From what I saw is that if you do not specify a relationship in RelatedQueryParameters, it will not return anything.

Thank you in advance

0 Kudos
2 Replies
LucasDanzinger
Esri Frequent Contributor

I believe you'll need to call queryRelatedFeatureWithFieldOptions in a loop for each relationship in the table - 

ServiceFeatureTable QML Type | ArcGIS for Developers 

ArcGISFeatureLayerInfo QML Type | ArcGIS for Developers 

0 Kudos
MarkHolm
New Contributor II

I did it this way and since queryRelatedFeatureWithFieldOptions cannot run concurrently it can be very slow. I was hoping there was another way.

Also I seem to be having a similar issue with selecting features. When features are selected onSelectFeaturesStatusChanged is called and returns the features in the selectFeaturesResult object.

This is great since I don't have to query the features and select them BUT my issue is I cannot get all the attributes from selectFeaturesResult like I can with queryRelatedFeatureWithFieldOptions and Enums.QueryFeatureFieldsLoadAll.

Is there a way to get all out fields with a select features?

0 Kudos