I have a map that utilizes a FeatureLayer for multiple queries that are performed by selecting items from dropdowns and clicking a button to perform the query. I'd like to filter/query this FeatureLayer right off the bat because I only want the queries to use records that have been verified (and not display unverified records). However, the definitionExpression does not seem to work and the other queries that are performed on this feature layer are still returning un-verified records
const obsLayer = new FeatureLayer({
url: "my MapServer url",
definitionExpression: "VERIFIED=1 OR VERIFIED=2",
outFields: ["*"],
visible: false
});
I also tried added the query to the FeatureLayer URL ( /query?where= ) but I received a message in the console log that it stripped the parameters.