Select & display most recent record

3395
11
04-06-2020 09:05 AM
CaseyTeske2
New Contributor II

I have a feature layer data set that captures records from a Survey. There are hundreds of fire station locations that are static. There are many records for a single station location (ex: each fire station submits an update every day or so-- the updates may not be regular. One station may report daily, another may report weekly).

We are trying to create a web-app or dashboard that uses the data ONLY for the most recent record submitted by each location (bonus if it will automatically re-query & update according to a specified schedule). Using 'filter by today' will not work because an update for a station may have happened a week ago, and I still need to show the information for that record along with a station that updated this morning. I'm looking for help on a solution to show: 'for each individual station, select the most recent record from MAX DATE and use fields from that record for that station in the web-app (or dashboard)'....

For example: from the screen capture, I'd like to display only specific attributes from the 4/2/2020 12:00 AM record in the dashboard/web-app. When that station reports their information again, I'd like the web-app/dashboard to automatically reflect that update...

Any Ideas for a newbie to this side of things???!!! I've been looking into ARCADE, but not sure exactly how to make it work correctly. TIA

#wildfire 

 Chris Ferner

11 Replies
XanderBakker
Esri Esteemed Contributor

Hi Casey Teske ,

I'm afraid that Arcade will not allow you to select and show only the last (most recent record) in ArcGIS Dashboard. You can create a pop-up that shows the most recent related record and there have been some related discussion recently: 

There is beta for ArcGIS Dashboard coming soon that will have extended support for configuration using Arcade expressions. Maybe what you are looking for will be in the next beta release of ArcGIS Dashboard.

Some other ideas that come to mind:

  • If you have your data in an Enterprise geodatabase, you could configure an attribute rule that is triggered on each insert
  • You could use a Notebook in ArcGIS Online and schedule it to extract the data you need and create a new hosted feature layer with only the latest record. This option does not have a trigger on the insert of a feature or record that will result in the update of the information you want to show in Dashboard. You will have to set the frequency to match your needs as closely as possible.
CaseyTeske2
New Contributor II

Thanks Xander Bakker... It's what I suspected. I'll keep playing in search of a work-around -- I can't be the only one with an issue like this

AndrewSouthern
Occasional Contributor

You aren't, I am in the exact same boat.  I have a Survey123 for long term care facilities and covid-19 related infections are updated daily or semi-daily.  I would like to display only the most recent report for each facility and cannot accomplish this by just filtering within a certain time period as the frequency of these reports is not consistent.  I've been searching through threads and have yet to find a good way to accomplish this goal.

CaseyTeske2
New Contributor II

Andrew did you ever get a solution? I am still banging my head on this one... 

CarlosSigal
New Contributor

Hi Andrew

If you use Survey123, you can do this, creating the fields that you want to know last values in the main layer, and calculating this fields with the original fields you want to copy last value. Example:

survey (sheet name)

type           name                label

begin group

text             name               Name

end group

 

begin group

begin repeat

decimal      temp          Temperature

end repeat

end group

 

begin group

note             lasttemp       Last temperature                                                   ${temp}   (in calculation column)

end group     

 

0 Kudos
RyanCooper5
New Contributor III

I'll just add to the record that you are not the only one looking for this functionality. I'm trying to do the same thing as you except for with park inspections.

0 Kudos
JustinConnerWR
Occasional Contributor II

Any luck?

0 Kudos
CaseyTeske2
New Contributor II

Justin Conner ... No, no luck-- we did a complicated "dummy" workaround with some filters on our feature layer, but .... it is not ideal!  If you have solved it, I'm all ears

ChrisSpagnoli
New Contributor

Same issue here. Been trying to figure out a workaround as well. I'm also dealing with data in a related table.

0 Kudos