QueryFeaturesAsync results with limited number of attributes

1286
5
Jump to solution
09-19-2019 02:29 PM
CraigStephens1
New Contributor II

I'll frame this question using the sample code.

arcgis-runtime-samples-dotnet\src\WPF\ArcGISRuntime.WPF.Viewer\Samples\Data\FeatureLayerQuery

When doing a QueryFeaturesAsync on the feature table, the resulting feature has only 3 attributes populated (NAME, OBJECTID, STATE_NAME).

There are quite a few more fields available as shown here.  And, of course, this fails:

var abbrev = feature.Attributes["ST_ABBREV"];

How do you execute QueryFeaturesAsync and get all of the attributes returned?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JoeHershman
MVP Regular Contributor
0 Kudos
5 Replies
JoeHershman
MVP Regular Contributor
0 Kudos
CraigStephens1
New Contributor II

Thanks Joe!  In the end, this does make sense.  In the absence of experience or message boards, this answer is elusive in both the samples and online help.

0 Kudos
JoeHershman
MVP Regular Contributor

I will agree that the documentation of ArcGISFeature:LoadAsync is lacking and the sample that does exist is not giving any indication of the purpose of the method

However, and not to be rude, GeoNet is a forum for community collaboration, not sure what you mean by lack of message board.  You received a response to your question within a day and it actually relates back very closely to a previously asked and answered question.  So I think this forum served you well and achieved it's purpose.

Thanks,
-Joe
0 Kudos
CraigStephens1
New Contributor II

That's not what I was trying to convey.  To put it another way... if one doesn't have the experience with Esri 100.x or access to the message boards, this would have been hard to solve on their own.

By no means was I intending a slam on the message boards.

JoeHershman
MVP Regular Contributor

Sorry for misinterpretation, and I agree.  I think the same could be said of most any type of development.  Without a forum like Stack Overflow I would not have been able to solve a nearly infinite number of problems I had in WPF.  Documentation can only go so far, and will in most cases only address the most fundamental use case and leave it to the developer to take it the next step.

Thanks,
-Joe
0 Kudos