# Lookup with multiple relation

**URL:** <https://community.glideapps.com/t/lookup-with-multiple-relation/23413>\
**Category:** Ask for Help\
**Created:** [February 25, 2021, 7:32am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413 "2021-02-25T07:32:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [February 25, 2021, 7:32am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/1 "2021-02-25T07:32:15Z")

</div>

Hi all,

I have two tables :

1. **Model** and **Price for Model**  
Eg :

- Super Lift = $100,000
- Super Tower = $50,000

1. **Model**  **Options** to add on “Options Price”

- Super Lift = Boom = $200
- Super Lift = Gated = $100
- Super Tower = Boom = $300
- Super Tower = Gated = $50
- Super Tower = Foot Brake = $450

For example, User can choose Super Lift with no options.  
and also, User can choose Super Lift with Boom .

My question how, to make a lookup for **Options Price** with two relations (Options and Model).

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 25, 2021, 8:21am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/2 "2021-02-25T08:21:47Z")

</div>

I’m thinking you would have a relation for model, where you pull back the price for model, and a relation for options, where you pull back the price for options. Then you add them together in a math column.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [February 25, 2021, 8:23am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/3 "2021-02-25T08:23:47Z")

</div>

but i need to do in first sheet.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [February 25, 2021, 8:25am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/4 "2021-02-25T08:25:06Z")

</div>

plus, the options itself got same name but different price. so it is dependent on two relations

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 25, 2021, 8:29am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/5 "2021-02-25T08:29:55Z")

</div>

Oh you’re right. Then what I would do is have a structure like this.

**Model |**  **Options** | **Price**  
Super Lift | (Empty) | $100,000  
Super Lift | Boom | $100,200  
Super Tower | (Empty) | $50,000  
Super Tower | Boom | $50,300  
Super Tower | Gated | $50,050  
Super Tower | Foot Brake | $50,450

Then join the model and options together in a template column. Let’s say it would be:

Super Lift & (Empty)  
Super Lift & Boom…

Join the user’s model choice and options together in another template column, then make a relation between the two templates column and bring back the total price.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [February 25, 2021, 8:33am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/6 "2021-02-25T08:33:27Z")

</div>

Hmm i dont think it is easy because Its about thousands data,

Is there any ways to do ?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 25, 2021, 8:36am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/7 "2021-02-25T08:36:26Z")

</div>

You would still have to create two relations if you want to keep the current structure, I believe you’re having 2 sheets.

First relation points the user’s model choice back to the Models sheet, returns the price of the model.

Second relation uses the template as described above to the Options sheet with another template column, also described above, to return the price of the option.

Then a math column to sum the two lookup results.

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [February 25, 2021, 8:41am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/8 "2021-02-25T08:41:55Z")

</div>

I dont think that you understand my problem.

I need to do the process on the first sheet. ( **Model** and **Price for Model** )  
The problem is , I make the model relation and option relation but how can I make a lookup as two condition (model and options) is filtered.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 25, 2021, 10:12am UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/9 "2021-02-25T10:12:48Z")

</div>

What is your desired end result?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 25, 2021, 1:18pm UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/10 "2021-02-25T13:18:00Z")

</div>

Why can’t you use the template method? It’s only a couple of columns and it automatically populates with data. It doesn’t matter how many rows of data you have. Your second option relation will use the template columns.

---

<div class="post-metadata">

**Author:** ![Mishta\_P](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mishta_p/32/16900_2.png) [@Mishta\_P](https://community.glideapps.com/u/Mishta_P)\
**Post date:** [February 25, 2021, 1:43pm UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/11 "2021-02-25T13:43:10Z")

</div>

The issue, as I see it, is that your options are unique to each Model.

If the Options were the same price you could do it with a lookup to an options table, however with each option being a unique $value you are essentially creating individual products.

You can still filter the product choices and the options, but that is done one the design side within the choice dropdown (or however you decide to access each product).

---

<div class="post-metadata">

**Author:** ![Gdclavijo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gdclavijo/32/13069_2.png) [@Gdclavijo](https://community.glideapps.com/u/Gdclavijo)\
**Post date:** [February 25, 2021, 11:36pm UTC](https://community.glideapps.com/t/lookup-with-multiple-relation/23413/12 "2021-02-25T23:36:45Z")

</div>

Hi **@biha** , I think, if you see this guide probably you can resolve your question… (relation Parent&Child) … [Subcategories + Hierarchies - Glide Library](https://docs.glideapps.com/all/guides/deep-dives/design/subcategories)
