Is it possible to update or add to and already declared definition expression? For instance, in this format: "id IN ('us70008jr5','cgi988jr52')"
I can declare multiple in the initial definationExpression with id, but as soon as I try to update it later or add to it, it never reads or executes.
I am trying to simply update or add to my definition expression based on a users choice from the front-end, I can't seem to get this to update; I have tried refreshing the feature layer.
let selectedID;
let datA;
layer.definitionExpression = "id IN ('')";
function filterByID(event) {
console.log('filter hit');
selectedID = event.target.getAttribute("data-id");
console.log(selectedID);
layer.refresh();
layer.definitionExpression = "id IN ('"+ selectedID +"')";
}
arcgis-js api 4.xx