# How to create relationship?

**URL:** https://www.five.org/t/how-to-create-relationship/304
**Category:** How do I?
**Created:** [December 17, 2023, 11:39pm UTC](https://www.five.org/t/how-to-create-relationship/304 "2023-12-17T23:39:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JeanXXIV](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/jeanxxiv/32/548_2.png) [@JeanXXIV](https://www.five.org/u/JeanXXIV)
#### Post date: [December 17, 2023, 11:39pm UTC](https://www.five.org/t/how-to-create-relationship/304/1 "2023-12-17T23:39:41Z")

</div>

Hello, this is my first steps in Five. In the tutorial video “How to Create a Many-to-Many Relationship in Five”, there is a panel called “relationship” with a plus sign in order to add new relations. In my application, I don’t have such panel, just a tab called “References” but no plus sign. Looks like an incomplete feature in a new version? How can I add new references like in the video? Thanks.

---

<div class="post-metadata">

### Author: ![Pranoy](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/pranoy/32/281_2.png) [@Pranoy](https://www.five.org/u/Pranoy)
#### Post date: [December 18, 2023, 12:48am UTC](https://www.five.org/t/how-to-create-relationship/304/2 "2023-12-18T00:48:43Z")

</div>

Hi Jean,

I am not sure why you do not see the button to add relationships, I reckon you might accidentally be under the “Tables” Menu instead of “Table Wizard”. If that’s not the case can you upload a screenshot of what you are seeing?

---

<div class="post-metadata">

### Author: ![JeanXXIV](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/jeanxxiv/32/548_2.png) [@JeanXXIV](https://www.five.org/u/JeanXXIV)
#### Post date: [December 18, 2023, 3:40am UTC](https://www.five.org/t/how-to-create-relationship/304/3 "2023-12-18T03:40:18Z")

</div>

You are right, I was not under the table wizard. I start creating a table with the wizard this time and I can effectively now add a relationship. Many thanks!

---

<div class="post-metadata">

### Author: ![BabaJahi](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@BabaJahi](https://www.five.org/u/BabaJahi)
#### Post date: [January 3, 2024, 7:25am UTC](https://www.five.org/t/how-to-create-relationship/304/4 "2024-01-03T07:25:55Z")

</div>

How can a relationship be created without using “Table Wizard”? i.e. How can I create a relationship for an existing table?

---

<div class="post-metadata">

### Author: ![Pranoy](https://yyz2.discourse-cdn.com/flex030/user_avatar/www.five.org/pranoy/32/281_2.png) [@Pranoy](https://www.five.org/u/Pranoy)
#### Post date: [January 3, 2024, 9:59pm UTC](https://www.five.org/t/how-to-create-relationship/304/5 "2024-01-03T21:59:40Z")

</div>

Hi BabaJahi,

That can be done through the “ **Tables** ” menu,

- Click on " **Data** and then “ **Tables** ”

- It should show you a list of all your existing tables, click on one(make sure this table has a field for Foreign Key as Five will not generate the primary and foreign keys for existing tables)

- Now, go to the “ **Indices** ” menu and click on add Indices which is shown by a “ **+** ” Icon.

 ![Slide 16_9 - 2 (1)](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/9421e90edbc1a601a36f99bfe94aa94f58cc2d0a.png)

- In the “ **Indices Menu** ”, select “ **Foreign** ” as the key type and complete the necessary details such as Dependent Index, Foreign Key Table, etc.

- Finally, click on “ **Index Fields** ” and select the field from your current table that corresponds to your Foreign Key.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/five/original/1X/8df2fce1034aa4a2b725e53d029b9b332a0565c5.png)
