# Automatic linking of child entities to their grandparent entities?

**URL:** <https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742>\
**Category:** Get Help\
**Created:** [November 6, 2024, 12:48am UTC](https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742 "2024-11-06T00:48:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.fibery.io/u/Jonathan)\
**Post date:** [November 6, 2024, 12:48am UTC](https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742/1 "2024-11-06T00:48:02Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.fibery.io/u/Jonathan)\
**Post date:** [November 6, 2024, 1:20am UTC](https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742/2 "2024-11-06T01:20:34Z")

</div>

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](https://community.fibery.io/t/auto-linking-via-a-to-many-relation-workaround/2701) 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.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [November 6, 2024, 3:56am UTC](https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742/3 "2024-11-06T03:56:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jonathan](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@Jonathan](https://community.fibery.io/u/Jonathan)\
**Post date:** [November 6, 2024, 4:02am UTC](https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742/4 "2024-11-06T04:02:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![njyo](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/njyo/32/923_2.png) [@njyo](https://community.fibery.io/u/njyo)\
**Post date:** [November 6, 2024, 4:27am UTC](https://community.fibery.io/t/automatic-linking-of-child-entities-to-their-grandparent-entities/7742/5 "2024-11-06T04:27:45Z")

</div>

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