What I'm trying to do is show the Last Edit Date for a feature in a Dashboard. I can see the last edit date in the REST URL but I'm not sure how to extract it in a format that can be posted to an Element in a Dashboard. I understand that Dashboards have the ability to say when they were last updated but I'm interested in reporting when the feature, that the dashboard is pointing to, was last updated. It can often be misleading when the dashboard says it was updated seconds ago but the data hasn't been updated for hours.
Seems like it should be simple enough with a custom URL, or Arcade, but I can't figure it out.
Thanks for the help.
We use a List element that is set to display one feature, sorted by last edited date descending, to show when the feature layer was last updated.
See it live at: https://maps.cookcountyil.gov/medexamcovid19/
Good suggestion thanks. We looked at doing this but the current data set we're uploading to AGOL does not have these fields. We could add them, of course, but this would force a few changes upstream that I was hoping to avoid. Also, there are often instances where the dataset does get updated, but there are no changes (we upload the data to AGOL every 10 minutes). Either way, going to keep this in my back pocket thanks.
Yeah, its all a workaround for not having an easy way to display when the layer was last touched. I guess with the ability to embed in a dashboard now, if you got the update date to display on a separate html page you host somewhere else, you could embed it.
You could potentially add the editor tracking fields on the AGOL layer and not anything upstream. Depending on how you are updating the layer, the AGOL update would trigger an update in the AGOL editor tracking, but if no records are actually getting updated that might not work.
Another idea is a separate hosted layer that is just an update log. Every time your script updates the main layer, it could add a new record to the update log layer with the latest timestamp. (Or just overwrite and have one record with the latest update timestamp if you don't care about maintaining a history). Then this layer's record could be what is displayed in the dashboard "Data Last Updated" box.