# Button -\> action -\> set columns value for different tables

**URL:** <https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860>\
**Category:** Ask for Help\
**Created:** [March 6, 2021, 12:52pm UTC](https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860 "2021-03-06T12:52:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![samblck](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/samblck/32/22860_2.png) [@samblck](https://community.glideapps.com/u/samblck)\
**Post date:** [March 6, 2021, 12:52pm UTC](https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860/1 "2021-03-06T12:52:37Z")

</div>

Hello!

I want my Button to clear values, but I am unable to do this within one screen.  
The following procedure (Button → action → set columns value) allows to only set columns value for ONE table. However I have my tables linked, it doesnt allow to set columns value for linked tables columns or manualy selected tables.

Maybe there is a workaround for this? Thank you!

---

<div class="post-metadata">

**Author:** ![SantiagoPerez](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/santiagoperez/32/16807_2.png) [@SantiagoPerez](https://community.glideapps.com/u/SantiagoPerez)\
**Post date:** [March 6, 2021, 1:02pm UTC](https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860/2 "2021-03-06T13:02:33Z")

</div>

Hola @samblck

If I’m understanding correctly, you want to set a value on a table from a different one. Say, set a value from the User Table to the Log Table, right?

If so you will need to create a template on both tables. Then on the “location” table you need to create a single relation.

Then create an action with the condition “if name button is name of button” \>set columns \> relation\> then the value and column you want.

I hope this helps.

---

<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:** [March 6, 2021, 1:03pm UTC](https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860/3 "2021-03-06T13:03:17Z")

</div>

You can Set Columns in linked tables only through _single_ relations.  
It’s not possible at this time to do it via multi-relations.

---

<div class="post-metadata">

**Author:** ![samblck](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/samblck/32/22860_2.png) [@samblck](https://community.glideapps.com/u/samblck)\
**Post date:** [March 6, 2021, 4:04pm UTC](https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860/4 "2021-03-06T16:04:21Z")

</div>

Hello!  
@SantiagoPerez may be even simpler, i will try to make it clear below. Thx for your workaround (this way i cant erase something from the column if i understand you correctly)

@Darren_Murphy  
Feels like tables not necesseraliy should be related in this case (or it’s some constraint of how glide is programmed)

Within 1 screen (Menu table) in app i have two inline lists (Menu and Category tables).

When I add Button component it automaticaly sees Menu table columns, but i cant ‘swtich’ it or select Category table columns. Now Button component only can control Menu table, I want it to control Category table either.

May be that can be solved?

---

<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:** [March 6, 2021, 5:20pm UTC](https://community.glideapps.com/t/button-action-set-columns-value-for-different-tables/23860/5 "2021-03-06T17:20:55Z")

</div>

Buttons are linked to the screen as any components become attached to the table you are on, so they have to use a value that’s in the table you are viewing.

If you want to set a value in the Category table from a screen that’s displaying a Menu table row, then you have to do it through a single relation that exists in the Menu table and linked to the Category table.
