How to use QueryParameters and specify outFields?

1418
5
Jump to solution
07-09-2018 09:24 AM
TaimoorKhan
New Contributor II

Hi, I'm trying to query a FeatureTable and receive data from specific output fields so that I can format that data and display it in my application. However, when I use FeatureTable QML Type | ArcGIS for Developers , the queryFeatures method which takes in a QueryParameters object, I can specify the whereClause but not the outfields. It seems the only way to specify the outfields is to use the ServiceFeatureTable's populateFromService, but that updates the map which I don't want. I simply want to query for the data and then I will use it for a graph or something else, so if I can see the data for each event being printed in the console log, I would be happy and be able to proceed. This is the data source: 

https://livefeeds.arcgis.com/arcgis/rest/services/LiveFeeds/Wildfire_Activity/MapServer/0

Any help would be greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

At the moment, the method you are looking at is the best option, and there is no explicit out fields that you can set. We are evaluating adding an outfields parameter to more closely represent the REST endpoint/previous API.

View solution in original post

5 Replies
TaimoorKhan
New Contributor II

Okay so I eventually got this figured out by using queryFeaturesWithFieldOptions, but even there, all fields are loaded and I can't specify the outfields. For the purposes of what I'm doing, it's okay, but is there a way to avoid this?

0 Kudos
LucasDanzinger
Esri Frequent Contributor

At the moment, the method you are looking at is the best option, and there is no explicit out fields that you can set. We are evaluating adding an outfields parameter to more closely represent the REST endpoint/previous API.

TaimoorKhan
New Contributor II

I think it would be worth considering because it seems intuitive that it would be the option would be there as a query parameter. Granted I'm new to ArcGIS and the Qt SDK, so it took me a little longer to understand the API. Thank you!

0 Kudos
StefanUseldinger
Occasional Contributor II

any news here?

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Nothing new. Do you have details of your workflow and what you are trying to achieve that you can't currently achieve? 

0 Kudos