Help

View that only shows that last record added

Topic Labels: Views
4598 7
cancel
Showing results for 
Search instead for 
Did you mean: 
Scott_Johnston1
4 - Data Explorer
4 - Data Explorer

Hello there. I’d like a view to only show the last record added. I can’t seem to figure out how to do this. Is it possible? If so, how? Thank you!

7 Replies 7

I think I would do it by marking the last one in a Checkbox field (manually), and creating an Automation that find and unchecks it when a new Record is created, and checks it as Latest. Then you could filter by that Checkbox field.

Anyway, what is your use case? :grinning_face_with_sweat:

Thank you, I will see if that works.

We’re storing data from several sensors in an airtable database. We want to display the latest entry as a Web page using Softr, but only want that web page to show the most recent enrty. This seems like a good way to do it. Open to any suggestions.

Scott_Johnston1
4 - Data Explorer
4 - Data Explorer

I’m stuck on the Automation. Where do I tell it I want to uncheck the check? In the attached image I’ve tried entering false and 0 in the “Fields” field.

2022-01-26_14-44-31

What is your base structure? If you have something like Sensors and Measures, you could get the last Measure of every Sensor like this:

  • Add a Linked Record field to Sensors, linking to Measures, so you can relate a measure to a sensor
  • Add a Created Date field to the Measures table.
  • Add a Rollup field to Sensors called “Last Measure Date”, to the Measures table, get the Created Date field, and add a MAX() so you get the most recent date of measures.
  • Add a Lookup field on Measures tables to the the “Last Measure Date” from Sensors.
  • Add a Formula field comparing Created Date and “Last Measure Date”, and if it is the same, you can output a 1, for instance. Call it “Is Last”
  • Add a Rollup field to Sensors, to the Measures table on the Measure Data field, filter it by the “Is Last” field.

Now you can show your Sensors table in Softr. It’s a little tricky but you avoid the automations.

Have you tried with FALSE, FALSE(), or just leaving it blank?

I’ve tested it and worked with false.

I’ve recorded a video about the automation test:

I like this solution, I was able to use it in my application. In my case its the most recent scan, but since I'm scanning every few seconds it marks several as true. 😞 Unless I'm missing something this suggestion will only be viable if timestamps are consistently a minimum of 1 min apart. any suggestions?