Select to view content in your preferred language

Map Viewer - Date Filter (today/after today/Date Range)

8382
17
09-20-2023 11:15 AM
Status: Open
SteveCole
Honored Contributor

The new Map Viewer (both AGOL and Enterprise) should have the ability to filter a layer's data by a date relative to the current date. For example, I have a layer of construction closures that have a start and endate as attributes. I want to apply a filter such that only records where the closing date occurs in the future would be displayed. With Map Viewer Classic, I believe you could edit the map's JSON in AGOL Assistant to implement this but I don't know if this is still possible with the new Map Viewer. Either way, users should have to hack their maps for a pretty standard date filter option.

The choices would be something like:

"occurs on.."   <Specific Date | Today>

"occurs on or after.." <Specific Date | Today>

"occurs on or before.." <Specific Date | Today>

It would be nice to also have some addition variants like "within the next week | within the next month" but a relative option like "today" should be the absolute minimum.

17 Comments
Amanda__Huber

@JörgMoosmeier  where are you seeing these additional expression filters? 

We're using ArcGIS Online and only see these options  for date time fields: 

Amanda__Huber_0-1714504769771.png

We're looking for an expression that is "in the current year". I don't think that exists yet so maybe that should be a separate idea post? 

 

Thanks,

Amanda Huber

Megan2
by

Also jumping on this! I made a Survey123 that has to do essentially with permits. I have one copy of the layer in my web map set to show features that have a start date "in the last 21 days" which indicates they are currently active, as the permit is only good for 21 days. However I'd also like to be able to filter by the End Date field, ideally with a filter of "in the next X days" so I can have staff easily see permits that are expiring soon so the people who requested said permits can be notified of the upcoming expiration. (Would love to set something up to automatically send emails but at this time we don't have access to Power Automate or anything; that's a whole different story)

 

"in the last" is a good start, but I think "in the next" is also desperately needed.

Teresa_Blader

I'd like to set a filter based on a field of expiration dates. I only want to show features in the map that are not "expired" based on the date. I'd like to say "is after now" but I only get specific date options to enter. Other options might be today, yesterday. Basically similar options as "in the last". However, "in the last" or "not in the last" is limiting because it creates a range and features show up outside of that range, so I have to do something ridiculous like 2628001 minutes or something.

Teresa_Blader_0-1729545158524.png

 

Megan2
by

@Teresa_Blader 

Yep, I'm literally back again and needing that same functionality. I'm working with permits and need to filter by only the permits currently active or that are upcoming, so while I see a "is after or equal to" option, it only then allows the user to pick a static date and time. I need "TODAY" to be an option for that! I need to be able to filter and show only the features whose End Date (a field in the data) "is after or equal to" TODAY. 

I was able to set up my symbology for all of this in Arcade, but the Experience Builder I've made using this web map has been showing all features in the Table widget and seems to be controlled by setting up a Filter for the layer in the web map. Which I'm unable to do, due to this limitation. Ack.

DenisLalonde

Bumping this Idea. Somewhat surprised that this isn't "out of the box" yet.

mwartman_grey
BrandonGuo

I can't believe there's no option to filter event happens today. There's no filter like "time" is on today.