I have set up the IdentifyTask, and it works great except for one problem. I allow the end-user to search on a date range which sets a definition expression to only display those features. However, the identify popup includes those features that are being excluded using the definition expression. On API version 3.xx I see a layerOptions parameter where I can pass the expression, but can't acomplish this with API 4.xx.
How do I get an Identify popup for only those features that are visible because of the definition expression?
This cannot be done at this time. We have an issue to add those missing parameters to 4.x IdentifyParameter class. We care also working on for the popup to show information only for visible features. I will update you once those issues are installed.