My organization has long had a need to be able to apply dynamic date filters on layers. An example is our road closures. What we want queried from the layer are closures that are within two weeks of their start time and up to their end time. Something like the formula below.
GETDATE() >= ('starttime' - INTERVAL '14 days') AND 'endtime' <= GETDATE()
Technically what I am asking for is already possible using the ArcGIS Assistant to edit the JSON of a web map. However, saving the web map through the Map Viewer UI will strip out the dynamic date filter.
I know the ArcGIS Road Closure solution at one point used an Arcade expression to set transparency on the layers. Yes, that hides the closures on the map, but it confused my users when they would click on what looks like one closure and the popup could return additional closures not visible on the map.
I've had experience with referenced data honoring that type of filter by way of setting up the definition query on the layer, then publishing the service. Are you only using hosted data? Or need the layer published in its entirety first?
@ZachBodenner we are not using only hosted data, and you are correct that dynamic date filters can be set before publishing for referenced data. I do feel like this idea applies to both hosted and referenced layers, but the bigger need is for hosted layers. If dynamic date filters are supported at the web map level then it does not matter what kind of service is involved.
Agreed! It actually hadn't even occurred to me that they wouldn't be support in Map Viewer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.