Sorting by custom formula in a view

I have three databases, Projects, Epic Tasks and Tasks with relations like this:
Project may have many Epic Tasks, and one Epic Task may have many Tasks.

I have a view of Projects, now I want to sort it so the first Project is project in which task was updated most recently. I tried adding .sort() in Filter option but looks it does not work, and unfortunately Sort option can only sorts buy fields inside this table.
Also I managed to get Projects in given order using canvas formula, but I can’t see a way to transform this formula into a view. Is any of these possible? If not, how can I achieve what I want?

Hi @Kiwi_on_scooter ,

Welcome to the community!

Assuming the following:

  • Projects table has an Epic Tasks relation column
  • Epic Tasks table has a Tasks relation column
  • Tasks table has a Last Modified column

You can just create a new column in the Projects table with the following formula:
[Epic Tasks].Tasks.[Last Modified].max()

For each project, this formula will consider all the epic tasks belonging to it and all the tasks belonging to those epics and then display only the latest date.

The next step is simply to use that new column for sorting your view.

Hope this helps!

Pablo

3 Likes

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