FeatureLayerView does not expose all attributes of its layer FeatureLayer fields

156
1
Jump to solution
3 weeks ago
Dirk_Vandervoort
New Contributor III

Here is the JavaScript (4.28):

 

 

 

theFeatureLayerToQuery.when(function(){
    mapView.whenLayerView(theFeatureLayerToQuery).then((theLayerView) => {
    reactiveUtils.whenOnce(() => !theLayerView.updating).then(() => {
        theLayerView.queryFeatures({outFields: ["*"] }).then(function(results){
            console.log(results);
        });
    });
});

 

 

 

 

The results in the console log show that there are 32 fields:Dirk_Vandervoort_0-1712939819395.png

 

The results in the features.attributes only show 4 attributes:Dirk_Vandervoort_1-1712939899753.png

I understand that the local queries on the FeatureLayerView are supposed to be more performant than against the FeatureLayer. However, I can't get to 28 of the 32 fields I need to do interesting things. How can I get all the fields into features of my FeatureLayerView ?

TIA

(one of these days: CodePen)

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

You need to set the FeatureLayer.outFields property to get all the fields as explained in the doc. 

View solution in original post

0 Kudos
1 Reply
UndralBatsukh
Esri Regular Contributor

You need to set the FeatureLayer.outFields property to get all the fields as explained in the doc. 

0 Kudos