Get 40%-off on all premium templates.
Discount code auto-applied at checkout.
Another great formula 2.0 use from Kavisha: sorting a list by date property.
‍
‍
She uses her habit tracker as an example, which is linked to a Month database where she aggregates the sorted dates and habit completion.
lets(
 currentMonthYear, formatDate(today(), "MMM YY"),
 /** Get all records of current month */
 currentMonthItems, MyHabits.filter(formatDate(current.Date, "MMM YY") == currentMonthYear),
 /** Sort these records by date in ascending order */
 sortedItems, currentMonthItems.sort(current.Date),
 /** Display information in sorted manner */
 sortedItems.map(
  lets(
   info, if(current.Done? == true, "🟢", "⚪"),
   current.Date.format() + ": " + info
  )
 )
)
‍
MyHabits
is the relation property to the habits databaseDate
is the date property from the habits databaseDone?
is the checkbox property from the habits database