Automatic linking of child entities to their grandparent entities?

I have the following database setup:

  • Milestones contain many projects (currently a 1-to-many but might be better as many-to-many)
  • Projects contain many tasks (currently a 1-to-many but may be better as a many-to-many).

I would like to link the tasks to their (grand)parent milestones. I see how I can visualize this relationship in a multi-level list, but this list isn’t as useful something like a Board would be.

I tried to make an automatic link between Milestones and Tasks, where if a Task’s Project matches any of the Milestone’s projects, they will be linked up, but the ‘rule’ only seems to only work in one direction (since a task has only one project, I can select it as the lookup key, but because a milestone has many projects, I can’t select it for the matching lookup key).

Does automatic linking only work for 1-to-1 relationships? If not, how can I approach this differently?

Is there some other way of traversing up a tree from a child node to it’s parent node’s parent node (does this make sense)?

After a search, I think it’s the to-many aspect of the attempted linking that is preventing me from doing what I want.

I found this workaround in a post from Polina from 2.5 years ago; I assume I’ll have to wade in chest deep and see if it’ll work for me, yes? Then maybe it’s worth requesting this as a feature.

Hi @Jonathan, can’t you just use a Lookup or a Formula. Both allow you to traverse. Lookup by one at a time, a Formula let’s you take multiple steps.

2 Likes

Interesting; both of those are concepts I haven’t worked with before; I’ll search them out in the user guide and see if I can cobble something together – thanks for the tip.

They are both in the “Add Field” section and should do your trick. :slight_smile: