Select to view content in your preferred language

Issue filtering pre-existing layer data by time

398
2
06-13-2022 09:12 AM
Labels (2)
JHolbrook
New Contributor II

Hello,

 

I've had an issue that I've run into periodically when using pre-existing layer sets in my maps. 

 

My mapping tends to be focused only on short term data, so I often use the filtering in the layer to restrict the data to the last 24 - 72 hours.  Some layers have a huge amount of data that extends quite far back and my maps are meant for current operations, so restricting it to the last 24 hours is important. 

 

Often, there isn't an issue with adding the filter restricting it to the last 24 hours, 2 days, 1 week, etc, but sometimes the layers I find are missing the option to filter "in the last" x hours/days/etc and instead are limited to filtering only to on/before/after specific dates. 

 

Can anyone explain why that is?  Even if both use a date/time group, they for some reason don't give me the same filter options. 

Filter without option in relation to current time 

Filter with the option in relation to current time 

Is there a fix for this? 

 

I've attached (or tried to, with our network) two examples of my layer options.  

0 Kudos
2 Replies
RussRoberts
Esri Notable Contributor

We only show options for in the last x for hosted layers bc these relative time queries are supported there.

 

RussellRoberts1_0-1655145879857.png

 

0 Kudos
bofiel
by
New Contributor II

I have a feature layer for my roads that is hosted by SDE but also exists in an AGOL web map where the edits in Pro kick up directly to AGOL in real time. I wanted to create a copy of my Roads layer online and set a filter to "History date is within the last 5 years" but I saw here that the "In the Last" filter option for date is only available for hosted layers? Is there a workaround for feature layers that are not hosted to set up a similar filter?

0 Kudos