QueryFeaturesAsync results with limited number of attributes

153
5
Jump to solution
09-19-2019 02:29 PM
Highlighted
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)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
MVP Regular Contributor
Reply
0 Kudos
5 Replies
Highlighted
MVP Regular Contributor
Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos
Highlighted
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.

Reply
0 Kudos
Highlighted
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.

Highlighted
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.

Reply
0 Kudos