Dynamic Date Filtering in AGOL

660
4
03-28-2019 12:06 PM
joerodmey
MVP Alum

Need to do dynamic date filtering in AGOL. I have a point feature service that includes a date field.

The date field is where I need to test. For example just say I have a point and it has a date next week (April 3, 2019). I want this date to only display when its April 3, 2019. Using a simple filter expression in AGOL on the feature service isn't an option because the date varies (or sometimes isn’t existent) record by record. The only other option that I have in mind is time animation but it doesn’t seem to be as slick as I had hoped it would be.

 

Any suggestions?

Thanks

0 Kudos
4 Replies
GeoJosh
Esri Regular Contributor

Hey Joe,

You can use a filter widget in the Web AppBuilder and create a query that only shows today's points:

joerodmey
MVP Alum

But I also want to see points that are today and historical. Basically I'm just trying to hide points that are in the future (only if the user asks for a reminder). This is acting as a "reminder" for the user in the sense that they don't want to see a point until the date they selected in Survey123 is reached. They will then fire up their map in Collector and see the "Reminder" point that acts as a task. They also need to see the point for more than one day

0 Kudos
GeoJosh
Esri Regular Contributor

Joe,

In my example, I used the query "DateTimeTest is on today". Instead of using "is on", you could use the "is on or before" operator, which should show today's points as well as any points with a date value in the past.

-Josh

0 Kudos
joerodmey
MVP Alum

I don't want the user to have to click on the filter button to see those points. 

0 Kudos