Display latest 3 items

We’re using Coda to store the list of completed projects.
I want to highlight the last 3 on the homepage as cards. When a new project is completed, it should appear in the top 3 and bump one of the older ones.

  • How do I limit the number of cards displayed to 3?
  • Can I use Last Modified timestamp (should be system-generated) instead of Date Completed (manually tracked).

:wave: Hey there!

You definitely can. They key to understanding this type of workflow are the formulas slice and sort.

You can do a formula like this inside the filter settings of the table:

thisRow.in(originalTable.Sort(false, sortBy: OriginalTable.Modified).slice(1,3))

Essentially what this is saying is:

Hey Coda, only show a row in this table/view IF that row happens to be in a list of the most recent three modified rows of the base table

Here’s a quick screenshot of it working!
Let me know if you have any other questions

Here’s some documentation on those formulas to understand better how they work

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.