I have a list of wildlife points that I'm collecting using Survey123, which I then load directly into a web map on ArcGIS Online. I have ~15 individuals, and I would like to set it up to automatically filter all but the last point. I am seeing posts on updating the SQL query to show only the point collected in the last day; however, I need my filter to be a little bit more variable than that.
For example, individual 1 might be located on Monday and Friday, individual 2 on Wednesday, etc., and on Saturday I only want to display the Friday point for individual 1 and the Wednesday point for individual 2, and so on for each individual.
I can do this within a web map or web app setting, I just want to dynamically see where the individual was last seen. What is the best way to go about this?
I don't have the solution you are asking for, but you could symbolize the map by time?
Set up a separate layer for each individual. and use an Arcade expression to show the more recent dates more prominently.
Take your feature layer and define symbols based on a Arcade expression similar to this.
Then edit an expression
Then try an expression like this:
var vstat = '' var time1 = Date($feature.CreationDate) if (DateDiff(Now(), time1, 'minutes')<=5){ vstat = 'within last 5 minutes' } else{ vstat = 'older than 5 minutes' } return vstat;
I used 5 minutes for time, but you can use days, hours, etc...
This will give you some default symbols, modify them to get a display you want. I made the older times more transparent. You could make them completely transparent, only showing the individual if it was in your specified time.
Set a Refresh Interval on the layer, so it will automatically update over time.
After that I set a filter to a specific 'animal'
Then just copied the layer and set Filter and Symbols for each individual.
In the first picture above I also labeled using the same expression, to give some context.
Mark
Hello! Is there a way to display the latest date for each item collected?
For example: I have a dataset that contains multiple features, some features are collected more than once. I am trying to display those features only once by the latest date of entry.
Thank you