AnsweredAssumed Answered

Limit the fields in Query Widget (Export to CSV)

Question asked by krishnavsav on Apr 4, 2020
Latest reply on Apr 19, 2020 by rscheitlin

Hi All,

 

I have seen Robert Scheitlin, GISP solution on below link and tried the same using WAB 2.15 but all the fields are getting downloaded in my csv.

 

Web App Builder - How to limit fields in "export to CSV" option in query widget? 

 

I have tried below code:

 

 var resultfields = [];
         
        for (i=0; i< popupInfos.length-1; i++){
            if (popupInfos[i].visible == true){
                resultfields.push(popupInfos[i].fieldName)
               
            }
           
        }
var fFlds = array.filter(layer.fields, lang.hitch(this, function(fldInfo) {
   return  resultfields.indexOf(fldInfo.name) > 0;
;}));
            
var featureSet = new FeatureSet();
featureSet.fields = lang.clone(fFlds);

 

Please help.

 

Thanks,

Krish

Outcomes