I am trying to update some code, getting rid of deprecated items. I am trying to change my feature table selections from selectRows() to highlightIds.add(), but I am having trouble. I am guessing I am needing to add some more lines of code getting graphics first? Any help will be appreciated.
https://codepen.io/mbdriscoll/pen/GReBgYd?editors=1000
parcelLayer.queryFeatures(query)
.then(function(response) {
// Open the popup with the queried features
theView.openPopup({
features: response.features,
featureMenuOpen: true,
featuresPerPage: 100,
});
addButtonToContainer();
if(response.features.length === 0){
alert("Search query found no results.");
return
}else{
for(let iii=0; iii < response.features.length; iii++){
//console.log(response.features[iii])
//featureTable.selectRows(response.features[iii]);
featureTable.highlightIds.add(response.features[iii]);
console.log(featureTable.highlightIds.add(response.features[iii]))
featureTable.filterBySelection();
}
};
});
Solved! Go to Solution.
Looks like you are adding the features. You want to add the OBJECTID
response.features[iii].attributes.OBJECTID
You can see this sample here.
Looks like you are adding the features. You want to add the OBJECTID
response.features[iii].attributes.OBJECTID
You can see this sample here.