# Display data from related record in table

**URL:** <https://community.weweb.io/t/display-data-from-related-record-in-table/515>\
**Category:** Ask us anything\
**Created:** [May 9, 2022, 12:42pm UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515 "2022-05-09T12:42:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Sebastian](https://community.weweb.io/u/Sebastian)\
**Post date:** [May 9, 2022, 12:42pm UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515/1 "2022-05-09T12:42:34Z")

</div>

Hey,

I am currently testing “weweb”. Unfortunately I can’t get it to show me related data in a table. I tried the lookup function, but somehow it doesn’t work with that either, or I’m doing something wrong.

Example:

I want to create a table from my collection “Contract”. In one column the corresponding “insurer name” should be displayed. The collection “Contract” contains the field “insurer id” to create the relation to the collection “Insurer” which contains the field “insurer name”.

How do I get the insurer name of the related record displayed in my table?

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [May 9, 2022, 2:23pm UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515/2 "2022-05-09T14:23:07Z")

</div>

Hi @Sebastian,

You need to create two Collections in WeWeb. One with the contracts, and one with the insurers.

Then, if you’re working with the “Contract” collection on one page, you will be able to lookup the “Insurer” collection as well.

In the example [here](https://docs.weweb.io/lookup-lookuparray/), we have a collection with a list of tickets in our public roadmap:

 ![Screenshot 2022-05-09 at 16.16.59](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/1X/199e1a1c2073a6995f23977c6c54d7e5e0ad975a.jpeg)

and a collection with a list of tags like “New feature”, “Bug”, etc.

 ![Screenshot 2022-05-09 at 16.17.12](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/1X/b84c0308242ffd54e58bf0e78b71eb9d33a49105.jpeg)

This enables us to lookup the list of tags of a specific item in the list of tickets.

Does that help?

If not, feel free to share a link to your project and/or record a short [loom](https://loom.com/) to walk us through what your project.

---

<div class="post-metadata">

**Author:** ![Aloy](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Aloy](https://community.weweb.io/u/Aloy)\
**Post date:** [July 30, 2022, 2:19am UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515/3 "2022-07-30T02:19:19Z")

</div>

Hey Joyce, I’m wrestling with a similar problem and not following your explanation here. I see in the documentation it says to use binding depth to set up the relationships between fields so you’ll be able to link related fields like you show in the linked example above. But I’m not using Airtable, instead Xano. How do you set binding depth between two tables from Xano?

---

<div class="post-metadata">

**Author:** ![kevinwasie](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/kevinwasie/32/402_2.png) [@kevinwasie](https://community.weweb.io/u/kevinwasie)\
**Post date:** [July 30, 2022, 2:39am UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515/4 "2022-07-30T02:39:49Z")

</div>

@Aloy there are several ways that you can do this. With Xano, if you want to handle it in the database, you can use addons.

Take a look at the post below. It may help. If not, let me know and I can get more info to you on how to set up.

> [@Getting Data from Two or More Tables](https://community.weweb.io/t/getting-data-from-two-or-more-tables/664/2):
>
> @patopt Two options: Backend: There are several ways to do this inside of your backend, but because you are using Xano, probably the easiest is to use Addons. This will give you the ability to simply “attach” your company to the user based on the account ID of the user. Xano has great documentation on this. As well, they hold office hours and can help you get this set up. Front End: If you wanted to do this on the front end, you could create two API endpoints in Xano. One for users, an…

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [August 8, 2022, 9:43am UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515/5 "2022-08-08T09:43:33Z")

</div>

Hi @Aloy 👋

Were you able to figure this out?

To follow up on Kevin’s answer, you indeed have two options:

1- use Add-Ons in Xano so that your one Collection in WeWeb includes all of the information you need. This is the best option if the data you want to add on doesn’t make the Collection too big and you will probably not need this information elsewhere.

2- create two Collections in WeWeb, one for each of your Xano tables, then use the [lookup](https://docs.weweb.io/lookup-lookuparray/) or [rollup](https://docs.weweb.io/rollup/) no-code formulas to “link” the two in the frontend. This is the best option if you will be using data from each table separately on other pages because you don’t want to load the same data twice (once with a collection that has add-ons and once with a dedicated collection)

Not sure if this makes more sense 😅

Let me know if not!

Otherwise, this is a bit of a long tutorial (21 minutes) because I wanted to show a [real use case](https://youtu.be/SOTuLHrsTEo) (how we built our public roadmap page in WeWeb) but I think it’s worth a watch (even at 2x speed!) for an introduction to some of the most helpful no-code formulas in WeWeb.

---

<div class="post-metadata">

**Author:** ![Aloy](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Aloy](https://community.weweb.io/u/Aloy)\
**Post date:** [August 9, 2022, 2:35pm UTC](https://community.weweb.io/t/display-data-from-related-record-in-table/515/6 "2022-08-09T14:35:01Z")

</div>

Thanks Joyce. I responded early that Kevin’s suggestion #1 was perfect. Doing it on the Xano side worked terrific to get the data I needed into Weweb.

I am still wrestling with presenting that data properly (eg updatable date fields in a data grid, etc) and with updating data back into xano, particularly when the data is a list of linked records from a related table. But I think that is just me needing to spend more time on it.
