How to put table row without date (or with rough date) in the sort by date?

Hey, guys. I have a long table with events and dates to them, sorted by date. But for some events, I don’t know exact date, only the month or season. And I need to somehow push these events with an inaccurate date into the sorting, so that, for example, the event that will be in the fall, is in the same place as other autumn events with an exact date. Cause when all of them at the bottom - it’s very inconvenient…

Is it possible to do this? Maybe with some formula, or pack? Or maybe someone knows an alternative application with this feature?

In general, I will be grateful if you show me it on this example.

1 Like

Hi @FiftyFour ,
and welcome to Coda Community! :handshake:

Unfortunately there is no quick way to sort it out.
You are requiring an intelligent date parser, and this really depends on the possible “rough” input you have.
Assuming you have a Time Input (Text) column, it can contain:

  • Autumn 2021
  • 2021 Autumn
  • Autumn
  • Oct '21
  • 2021 October
  • Oct-21

You have to write yourself the logic to recognise the date components to become an actual (sortable) date.
So, the discriminant here is: do you have a finite set of possible rough inputs?
This can give an estimated complexity of the formula.

I hope this helps.

Are you sure this isn’t possible?

Look how I did it in Notion.

The first column is just a name
The second column is the date for events with an exact date
The third column is a tag for events without dates, just for beauty

The fourth column is the date for events without dates, which simply determines their location in the table.

The fifth column is the most important thing. The formula. The dates from the second and fourth columns are automatically copied to this column, and the entire table is sorted by the formula

Formula: (not empty(prop(“EventDate”))) ? prop(“EventDate”) : prop(“Date for events without dates”)

The fourth and fifth columns are hidden, so the table looks like this.

Hi @FiftyFour

It is indeed possible. It really depends on where the logic resides.

This is actually not clear to me.
It seems a manual input date. So, you do have the date, somehow.
In that case, it’s straightforward.

This is the very same example you had in Notion built in Coda:

Please, let me know if I got your point.


Yea, exactly. Now it works like in Notion. Thanks.

But can it be improved a little? For example, when I put the “Autumn” tag, what would always automatically set September 1 in the “Date for events without a date” column?

Hey there, it looks like in Notion the rows* are automatically assigned the first date within the date range for you. You can set up something similar by using the Value for new rows in your column options. What I was thinking before was that the dates needed to be randomized, but if the first date within the date range works you can reference the control name followed by .First(). Here’s a screenshot for reference.

This is what I initially thought you were going for, where a date is randomly assigned from the date range rather than the first date from the range being used. Either way, the value for new row will always be a date within the range selected in the date range picker. Hope this helps!

Screenshot of formula:

Hi @FiftyFour,
sure you can!

One idea is @Renita_Mwangachuchu suggestion.

But also, have a look at the modified version of the doc.
You can “extend” the Seasons table so that it holds a default date.

Things are getting a bit more - but definitely doable - if you need to have wider seasonalities (i.e. more years).
But if you are limited to one year, this is already working.