Just a quick question in regards to layer's definitionExpression, have been searching for a little bit but haven't come across it. Is there a way to display how many features gets to be rendered based on the zoom scale or LOD? example; set definitionExpression = 'active' at the start of the map load 1:1,000,000, as users zoom in further to 1:500,000 definitionExpression in ('inactive','active'), and so on so forth. TIA.!
Not sure whether you question was more from programing side or not. If the Q was about programming side, then you can skip the rest of my comment.
Otherwise, if you publish your data from ArcGIS Pro and as a map service (aka map image layer), you can use display filters - as the name suggests, unlike def queries this only affects drawing, but if you want to query/identify you can still do that on features that are not drawn
please let me know if you have any question.