# Trying to create a very simple CRM

**URL:** <https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193>\
**Category:** Get Help\
**Created:** [September 26, 2023, 1:45am UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193 "2023-09-26T01:45:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cire12](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@cire12](https://community.fibery.io/u/cire12)\
**Post date:** [September 26, 2023, 1:45am UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/1 "2023-09-26T01:45:48Z")

</div>

I’m brand new to Fibery and trying to figure out, among other things, how I can construct a simple CRM. Right now I have 3 databases; Company Name, locations, and contacts. A company can have many locations, and a location can have many contacts.

When a new contact is added to the database, and the individual is associated with a company, I want the location (address) drop down to only return locations associated with the selected company, and not the entire locations database. Is this possible?

---

<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:** [September 26, 2023, 8:03am UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/2 "2023-09-26T08:03:07Z")

</div>

Hi, as far as I know, you cannot filter Locations. But you could give the companies a Location and then use a Lookup or Formula to set the same Location for a contact.

---

<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:** [September 26, 2023, 9:03am UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/3 "2023-09-26T09:03:07Z")

</div>

Assuming your relations are as follows,

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

Company → Contacts  
Location → Contacts  
Companies ←→ Locations

then you can add a relation filter to limit Locations to only those related to the Company the Contact belongs to:  
 ![firefox_9xVd21vvXe](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/d/d086e9d535bd5549714b98faa1b834720dc7b4c0.gif)

---

<div class="post-metadata">

**Author:** ![cire12](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@cire12](https://community.fibery.io/u/cire12)\
**Post date:** [September 26, 2023, 5:06pm UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/4 "2023-09-26T17:06:05Z")

</div>

Thanks @Chr1sG, that’s exactly what I’m trying to do, but I’m confused on a couple of things. First, I remember seeing relationship diagrams like the one you posted when I played around with Fibery some time ago, but now mine just look like this:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/5/5c55ac296d76ac1d7e84e3ecf1b56f214792c122.png)  
When I attempt to build the filter like you do I end up with an empty results list, which I’m sure has something to do with my relationships. Where have I gone wrong?

---

<div class="post-metadata">

**Author:** ![cire12](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@cire12](https://community.fibery.io/u/cire12)\
**Post date:** [September 26, 2023, 5:06pm UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/5 "2023-09-26T17:06:38Z")

</div>

![Screen Recording 2023-09-26 at 8.04.27 AM](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/7/78238656fcc255162ae192f1ff182a7f18bc22c1.gif)

---

<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:** [September 26, 2023, 5:25pm UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/6 "2023-09-26T17:25:38Z")

</div>

The map I showed is taken from the space page in the top right corner:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/9/9257b72362e04109bdfece4f24f52945135712f9.png)

I assumed that the relation between Company and Location was many-to-many, but maybe not?  
I also assumed that the relation between Contact and Location was many-to-one, am I wrong?

---

<div class="post-metadata">

**Author:** ![cire12](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@cire12](https://community.fibery.io/u/cire12)\
**Post date:** [September 26, 2023, 11:22pm UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/7 "2023-09-26T23:22:56Z")

</div>

1 company to many locations  
1 location to many contacts

---

<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:** [September 27, 2023, 6:15am UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/8 "2023-09-27T06:15:09Z")

</div>

Well, I have now reproduced your relations, and the relation filter works fine for me.

![firefox_tMQlCZWleb](https://us1.discourse-cdn.com/flex020/uploads/fibery/original/2X/a/a8988c2164bdbbfaf85f58b417cd111c211d8aa7.gif)

Can you provide screenshots/gifs for the Companies called Airebeam and Breezeline (or any Companies where the linked Contacts are not behaving the way you would expect). What Locations are they each linked to?

---

<div class="post-metadata">

**Author:** ![cire12](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@cire12](https://community.fibery.io/u/cire12)\
**Post date:** [September 27, 2023, 3:45pm UTC](https://community.fibery.io/t/trying-to-create-a-very-simple-crm/5193/9 "2023-09-27T15:45:42Z")

</div>

Ah! 😆 I got it working by switching to your relationship structure, and then when I switched back to mine it still worked. I must have had something wrong that first time. Thanks for all your help!
