# Combine multiple relation fields in a formula

**URL:** <https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060>\
**Category:** Get Help\
**Created:** [February 25, 2023, 9:26am UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060 "2023-02-25T09:26:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 25, 2023, 9:26am UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/1 "2023-02-25T09:26:15Z")

</div>

I have a database that is connected to multiple databases using relation fields, and I’m trying to use a formula field to combine all the content of the different relation fields.  
IS it possible to do it with formulas?

---

<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 25, 2023, 2:10pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/2 "2023-02-25T14:10:36Z")

</div>

Short answer: it’s not currently possible, but the request is already noted in our backlog, so we will add your vote.

Long answer: there are various workarounds that might solve the problem, depending on your specific needs

> [@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…

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [February 25, 2023, 8:39pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/3 "2023-02-25T20:39:51Z")

</div>

@A_Sleman How exactly are you wanting to combine the content from the different DB’s?

- Combine fields from a single entity in each DB?
- Or combine fields from multiple entities in each DB?

---

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 26, 2023, 3:33pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/4 "2023-02-26T15:33:28Z")

</div>

I’m trying to combine relation fields from different databases of a row in a database

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

so far i can only display the content of a single relation field in the multi relation formula.

---

<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, 2023, 4:51pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/5 "2023-02-26T16:51:07Z")

</div>

Fibery does not support polymorphic relations (and there are no immediate plans to).  
What is the use you have for such a combined field?

---

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 26, 2023, 5:49pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/6 "2023-02-26T17:49:36Z")

</div>

The use of what I’m trying to do is filtering only 1 field instead of having multiple fields in board view

---

<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, 2023, 6:41pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/7 "2023-02-26T18:41:25Z")

</div>

So you want to be able to apply multiple filters? Do the current options for filtering not support what you need?

---

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 26, 2023, 7:07pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/8 "2023-02-26T19:07:45Z")

</div>

its not a matter of filtering as i can hide empty fields but i want to show all relations in one field and hide the individual relation fields because in my real database i have more than 5 relation fields that are connected to different databases, so it gets messy after a wile because not all tasks have a relation to all the different databases sometimes they have only one relation and the other fields are just empty.

---

<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, 2023, 8:12pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/9 "2023-02-26T20:12:51Z")

</div>

> [@A\_Sleman](#):
>
> i have more than 5 relation fields that are connected to different databases, so it gets messy after a wile because not all tasks have a relation to all the different databases sometimes they have only one relation and the other fields are just empty.

> [@A\_Sleman](#):
>
> only 1 field instead of having multiple fields in board view

On a board view (as with most views) it is possible to hide fields which are empty so that they don’t take up any space.

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

Or do you mean that you want to hide empty fields on entity view?

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [February 27, 2023, 1:13am UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/10 "2023-02-27T01:13:34Z")

</div>

You can create a Formula field to concatenate the _Names of_ entities from any `*-to-1` relations (you might need to use javascript to do this for `*-to-many` “container” relations).

But this Formula will result in a Text field, not something you can click on to open the related entities; that would require an actual Relation/Lookup field, which as you noticed can only filter the entities from a _single_ relation.

It is a fundamental (and much-lamented) limitation of Fibery that there is **no** concept of Type polymorphism/inheritance/hierarchy/interfaces/composition.  
😥

---

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 27, 2023, 1:40pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/11 "2023-02-27T13:40:47Z")

</div>

My bad, i meant table view not board view i mix them up all the time

---

<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 27, 2023, 1:43pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/12 "2023-02-27T13:43:32Z")

</div>

OK, that makes sense 🙂

As @Matt_Blais points out, polymorphism isn’t supported (and it probably isn’t arriving any time soon) sorry.

---

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 27, 2023, 1:43pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/13 "2023-02-27T13:43:53Z")

</div>

Unfortunately a text field isn’t really what I’m looking for because you can’t interact with it

---

<div class="post-metadata">

**Author:** ![A\_Sleman](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/a_sleman/32/6279_2.png) [@A\_Sleman](https://community.fibery.io/u/A_Sleman)\
**Post date:** [February 27, 2023, 6:14pm UTC](https://community.fibery.io/t/combine-multiple-relation-fields-in-a-formula/4060/14 "2023-02-27T18:14:05Z")

</div>

That’s alright i just wanted to know if there was a solution, I’m sure there are other more important features arriving
