# How to create an automatic relation based on a number of different criteria

**URL:** <https://community.fibery.io/t/how-to-create-an-automatic-relation-based-on-a-number-of-different-criteria/4140>\
**Category:** Get Help\
**Created:** [March 16, 2023, 10:51pm UTC](https://community.fibery.io/t/how-to-create-an-automatic-relation-based-on-a-number-of-different-criteria/4140 "2023-03-16T22:51:37Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![billyjackson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/billyjackson/32/6345_2.png) [@billyjackson](https://community.fibery.io/u/billyjackson)\
**Post date:** [March 21, 2023, 3:09am UTC](https://community.fibery.io/t/how-to-create-an-automatic-relation-based-on-a-number-of-different-criteria/4140/6 "2023-03-21T03:09:59Z")

</div>

Another question:

Having successfully implemented this across multiple Email Accounts (each with 3x fields connecting each Contact to each Email, with a different database for each email accounts messages), I’m running into another difficulty:

I’m looking to create a single list view that shows all the emails from every inbox, inside of the associated Contact entity views.

The problem is that each Contact entity has the following relations:

1. Emails From Person A
2. Emails To Person A (A lookup only, via Gmail Contacts)
3. Emails (To+From Combined, created by automation) Person A
4. Emails From Person B
5. Emails To Person B (A lookup only, via Gmail Contacts)
6. Emails (To+From Combined, created by automation) Person B
7. etc. for add’l inboxes

And when I go to create a list view within a contact entity and try to include multiple “First Level” databases for target Emails To+From, both Person A and Person B, there is no ability to tell the UI which relation I’m referring to. Sometimes, I get both relation I’m looking for (Emails To+FroM). Sometimes, it seems like I get the wrong one (Emails To+From Person A; Emails From Person B).

Is this the intended functionality and I am thinking about this incorrectly, or is there a functionality limitation here for interacting with multiple different relations between the same two entities?

---

_[View the full topic](https://community.fibery.io/t/how-to-create-an-automatic-relation-based-on-a-number-of-different-criteria/4140)._
