Siblings as Children of Parents: filter self

Bit of a confusing title, but basically:

When using self-relations in a type, the uni-directional type is often a great fit for the relation (that is - not for situations where I’d want the basic / undirected / bi-directed siblings), where the concept of “parent” entities and “child” entities exists, but they really are all the same type.

In such scenarios, it’s often nice to see automatic sibling links, through a lookup: using the children of parents. The problem is that this results in including the entity itself as one of its own siblings.

Is there a way to include these auto-siblings while filtering the self? This could be doable through the API but seems like the lookup version is already so close.

Thanks!

2 Likes

I think this will eventually be possible by using a formula field, when the option to refer to self in a formula becomes possible (it was requested here at some point but I can’t find it at the moment).

So for example, a type with a relationship to itself (parent-children) can have a lookup field (Siblings) which is:
Siblings: Parent -> Children
which as you say, returns all children including itself.

But then use a formula that filters out itself:

Siblings excl : Siblings.filter(Name != this.Name)

@mdubakov @antoniokov
Is self-referring on the horizon?

1 Like

Would love to see this feature as well. I have tried to set up a “Task/Subtask” arrangement within the same Type, and this seems like it could help with that.

1 Like

This is the 4th different use case we’ve got for this in Formulas. This applies to the .Filter() function too.

We are still not sure how to implement it technically. We’ll probably do some research this autumn (not a promise, but :crossed_fingers:).

Stay tuned!

2 Likes