# How to create a collection from a property of another collection in a rule?

**URL:** <https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597>\
**Category:** Get Help\
**Created:** [February 28, 2022, 6:16pm UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597 "2022-02-28T18:16:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claude\_de\_Loupy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/claude_de_loupy/32/1637_2.png) [@Claude\_de\_Loupy](https://community.fibery.io/u/Claude_de_Loupy)\
**Post date:** [February 28, 2022, 6:16pm UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/1 "2022-02-28T18:16:49Z")

</div>

Hi. I searched here but didn’t find any clue to do that.

- I have three tables: contact, organism, task
- Contact has a relation to a one or several organisms
- Task has relations to one or several contacts and organisms

When updating Contacts in a Task, I would like to automatically update the linked Organisms.

Is it possible?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 28, 2022, 7:20pm UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/2 "2022-02-28T19:20:18Z")

</div>

It might be easiest if you provided a screen grab of the map for the space

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 28, 2022, 7:25pm UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/3 "2022-02-28T19:25:26Z")

</div>

Is it right that you want any/all Organisms belonging to a Contact to be added to the existing list of Organisms connected to the Task, when the Contact is added to the Task?  
What should happen if a Contact is disconnected from a Task?  
What should happen if an Organism is disconnected from a Contact while the Contact is linked to a Task?

---

<div class="post-metadata">

**Author:** ![Claude\_de\_Loupy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/claude_de_loupy/32/1637_2.png) [@Claude\_de\_Loupy](https://community.fibery.io/u/Claude_de_Loupy)\
**Post date:** [March 1, 2022, 9:00am UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/4 "2022-03-01T09:00:10Z")

</div>

Hi Chris. Sorry, I missed your answers.

> Is it right that you want any/all Organisms belonging to a Contact to be added to the existing list of Organisms connected to the Task, when the Contact is added to the Task?

Correct

> What should happen if a Contact is disconnected from a Task?

The organisms linked to the task should be updated. In fact, I wanted to “recalculate” the Organisms field each time the Contacts field of a task is updated.

> What should happen if an Organism is disconnected from a Contact while the Contact is linked to a Task?

The way I designed the application, that cannot happen.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [March 1, 2022, 9:07am UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/5 "2022-03-01T09:07:55Z")

</div>

Based on what you have written, I guess your space relations look like this:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/b/b5962f9eec0054ee1873a8f533eea126229728ed.png)

In which case, it sounds like you could do the following:

- use a lookup field in Task to get the Organisms from linked Contacts
- create a new relation between Task db and Organism db (one-to-many) called something like ‘All Organisms’
- define an automation that will update All Organisms with the union of the original relationship and the lookup

If you need help with any of these, let us know.

---

<div class="post-metadata">

**Author:** ![Claude\_de\_Loupy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/claude_de_loupy/32/1637_2.png) [@Claude\_de\_Loupy](https://community.fibery.io/u/Claude_de_Loupy)\
**Post date:** [March 1, 2022, 9:39am UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/6 "2022-03-01T09:39:05Z")

</div>

How could I not think about Lookup!!!  
Sorry Chris. It was a stupid question. Thanks a lot.

By the way, maybe another stupid question: How do you merge (the union you talk about) two collections of the same type (e.g. two collections of organisms)?

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [March 1, 2022, 11:21am UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/7 "2022-03-01T11:21:33Z")

</div>

I’ve just investigated, and I think my original suggestion needs modifying, sorry.

- you will actually need a lookup field in Organisms to find the Task from the Contact (called say ‘Contact Task’)
- you will probably need a **many-to-many** relation between Tasks and Organisms called something like ‘All Organisms’ (because actually an organism could theoretically be linked to one Task directly and then linked indirectly via a Contact to a different Task)

Then based on your original request, you need two automations (to run when Contacts are linked/unlinked to/from the Task).

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/3/3630aba0ad858022b3c3ca442016515d801c8633.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/8/8df91752b1c64f30f7378491aba7e38117a78982.png)

Where the update formula is something like this:

```auto
Organisms.Filter((Task = [Step 1 Task]) or ([Contact Task] = [Step 1 Task]))

```

What this does is query all Organisms to find those that are either directly related to the Task or indirectly related (via Contacts).

FYI, you may also wish to have two additional automations to run when Organisms are linked/unlinked to/from a Task (doing the same action).

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/2/213135eb159b31319d91d5323d08b2412cfa32ef.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/552affdd74935fe8a7f3bdc5810f4aac313494d7.png)

---

<div class="post-metadata">

**Author:** ![Claude\_de\_Loupy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/claude_de_loupy/32/1637_2.png) [@Claude\_de\_Loupy](https://community.fibery.io/u/Claude_de_Loupy)\
**Post date:** [March 1, 2022, 11:33am UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/8 "2022-03-01T11:33:35Z")

</div>

Wow! Thanks a lot for your investigation and the long and complete answer.

A “union” function would be way easier but, meanwhile, that works.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [March 1, 2022, 11:36am UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/9 "2022-03-01T11:36:50Z")

</div>

> [@Claude\_de\_Loupy](#):
>
> A “union” function would be way easier but, meanwhile, that works.

Indeed.

> [@How to union two list fields in the same Database?](https://community.fibery.io/t/how-to-union-two-list-fields-in-the-same-database/2467):
>
> I have two list fields in my Database: Tags and [Project Tags]. (Tags is an x:many relation and [Project Tags] is a lookup of an x:many field.) I want to combine them into a single list field [All Tags], so if (eg) Tags = (foo, bar) and [Project Tags] = (baz, bam) then [All Tags] = (foo, bar, baz, bam). Is this possible? I can’t figure out how to do it with a formula or a lookup. Extra complication: ultimately I actually want the unique set of all tags, so if (eg) Tags = (foo, bar) and [Pro…

It is on our radar.

---

<div class="post-metadata">

**Author:** ![Chr1sG](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/chr1sg/32/3941_2.png) [@Chr1sG](https://community.fibery.io/u/Chr1sG)\
**Post date:** [February 26, 2025, 1:26pm UTC](https://community.fibery.io/t/how-to-create-a-collection-from-a-property-of-another-collection-in-a-rule/2597/10 "2025-02-26T13:26:10Z")

</div>


