# ADD from another table using Glide Tables?

**URL:** <https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146>\
**Category:** Ask for Help\
**Created:** [April 5, 2021, 12:13am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146 "2021-04-05T00:13:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)\
**Post date:** [April 5, 2021, 12:13am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/1 "2021-04-05T00:13:22Z")

</div>

Hi! I am pretty new to glide, so this might be very basic (or impossible).

Basically I have an “`Orders`” table and a "`Products in Order table"`

Inside the `Orders` table I have a related column populated with the corresponding products from the `Products in Order table`

So far, so good.

In the `Orders` table I have a `Total` column which I am supposed to fill with the `SUM` of the prices of the products for the corresponding order (remember the products come from the `Products in Order table`)

I need this in order to tell the Checkout Button how much the order will be.

I understand this would be “simple” with google sheets, but can’t find a way to do it with Glide Tables.

Any suggestions will be appreciated!  
Thanks a lot! Hope I was clear enough.  
Happy easter!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 5, 2021, 1:49am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/2 "2021-04-05T01:49:09Z")

</div>

You can do it like this:

- Create a [multi-relation](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column#multiple-relations) _from_ your Orders table _to_ your Products in Orders table, that joins by Order Number (assuming you have that)
- Now you can use a [Rollup](https://docs.glideapps.com/all/reference/data-editor/computed-columns/rollup) column that gets the sum of all products for each order via that multi-relation

---

<div class="post-metadata">

**Author:** ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)\
**Post date:** [April 5, 2021, 3:17am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/3 "2021-04-05T03:17:12Z")

</div>

Thanks a lot! Will try this out!

---

<div class="post-metadata">

**Author:** ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)\
**Post date:** [April 5, 2021, 4:03am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/4 "2021-04-05T04:03:37Z")

</div>

Thanks! your solution worked! but… the Buy Button won’t take rollup fields as “`Price`”

Do you know of any way I can convert that into something that the Buy Button would like?

Thanks again for all your help!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [April 5, 2021, 4:10am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/5 "2021-04-05T04:10:12Z")

</div>

Sorry, I’ve never never used the buy button, so I’m not sure.  
But you could try converting it to a math column (multiply by 1) - that might work.

---

<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:** [April 5, 2021, 4:11am UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/6 "2021-04-05T04:11:57Z")

</div>

Price can only take Sheet columns as input, as far as I aware, due to security issues.

---

<div class="post-metadata">

**Author:** ![Yakito](https://avatars.discourse-cdn.com/v4/letter/y/b2d939/32.png) [@Yakito](https://community.glideapps.com/u/Yakito)\
**Post date:** [April 5, 2021, 1:07pm UTC](https://community.glideapps.com/t/add-from-another-table-using-glide-tables/25146/7 "2021-04-05T13:07:47Z")

</div>

Thanks @Darren_Murphy , @ThinhDinh for your time!

@ThinhDinh ouch, I really needed to use dynamic pricing. I will see if I can find some workaround in the flow.

Thanks again, have a great week!
