/// <summary> /// Get all of the values in the related table to display when editing feature /// </summary> private async Task GetAvailableValues() { var queryParams = new QueryParameters() { ReturnGeometry = false, WhereClause = "1=1", }; try { // Query and load all related records var featureQueryResult = await FeatureTable.QueryFeatures(queryParams); var availableValues = new ObservableCollection <PopupManager>(); foreach (ArcGISFeature result in featureQueryResult) { if (result.LoadStatus != LoadStatus.Loaded) { await result.LoadAsync(); } availableValues.Add(new PopupManager(new Popup(result, result.FeatureTable.PopupDefinition))); } // sort the list of related records based on the first display field from the popup manager if (availableValues.Count > 0 && availableValues.First().DisplayedFields.Count() > 0) { OrderedAvailableValues = availableValues.OrderBy(PopupManager => PopupManager?.DisplayedFields?.First().Value); } } catch (Exception ex) { UserPromptMessenger.Instance.RaiseMessageValueChanged(null, ex.Message, true, ex.StackTrace); } }