Referencing properties on self

WHAT DO YOU RECOMMEND?

On a page/object, and by extension in templates, I’d like the option to self-reference properties of the current object, not just the current object itself.

HOW COULD IT BE DONE?

In filters, implement a new option to filter by filterable properties of the current object.

REAL WORLD USE CASES

I have a space with a couple thousand tasks. Each task has a creation date and a due date. I’m creating date-based dashboards that show tasks based on their active time range.

I created a new type called “Timeframe”, and it has start and end date properties. I’d like the default template for this type to define an inline live query that queries for all tasks where the creation date is on or before the start date of the Timeframe, OR the due date is on or after the end date of the Timeframe.

I believe the OR operator is in beta, so that’s one checkbox ticked already.

RECOMMENDED ALTERNATIVES

Currently what I have to do is ignore the date range of the Timeframe for the live query purposes, and just search for tasks that are linked to the Timeframe (which does cause newly created tasks to be linked, thankfully), but if the due date of the task changes, this won’t automatically cause the task to be removed from the dashboard.

But when you think about it, this is just a more complicated way to make a Collection.

ADDITIONAL CONTEXT

This feature would be a natural extension of Self-pointing placeholder filter in templates

In fact this is the “other side of the medal” for Automatically add an object to a filter or anywhere else based on Parent-Child or other Anytype relationships - #2 by blaggacao and my honest recommendation would be to scope these two together as one work package.

Odoo/Frappe/ERPNext calls them “dot chains”.

In the linked comment, they are described as virtual properties on an object to be hoisted on the fly (never going stale, no copy).

Here they are described for the right side of a filter expression. (As I understand it, or unclear to me)

In fact, they should be available on the left side of a filter expression, too.

These relations command additional roundtrips to the persistance layer.

Hence, for a first implementation and to keep latency checked, I would recommend to artificially cap the depth of dot chain traversal to one single traversal.

/cc @kaye