# Row Unique Buttons Actions

**URL:** <https://connect.superhuman.com/t/row-unique-buttons-actions/18126>\
**Category:** Ask the Community\
**Created:** [September 2, 2020, 10:07pm UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126 "2020-09-02T22:07:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy\_B](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/andy_b/32/6915_2.png) [@Andy\_B](https://connect.superhuman.com/u/Andy_B)\
**Post date:** [September 2, 2020, 10:07pm UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/1 "2020-09-02T22:07:25Z")

</div>

I would like to be able to control multiple unique button actions from one single control table.  
Each button should take the formula or condition from the next column allowing easy unlimited configuration of button actions.

https://coda.io/embed/C4BgpPK71H/_su3Bc?viewMode=embedplay&hideSections=true

---

<div class="post-metadata">

**Author:** ![Johg\_Ananda](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/johg_ananda/32/13930_2.png) [@Johg\_Ananda](https://connect.superhuman.com/u/Johg_Ananda)\
**Post date:** [September 3, 2020, 1:56am UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/2 "2020-09-03T01:56:01Z")

</div>

Hi @Andy_B this sounds like a great idea! It would be helpful to see an example - its great that you shared your doc however the permissions don’t allow us to see it. Please make it public with edit access so we can take a stab and better understand what you are trying to do.

---

<div class="post-metadata">

**Author:** ![Mario](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/mario/32/12232_2.png) [@Mario](https://connect.superhuman.com/u/Mario)\
**Post date:** [September 4, 2020, 11:47am UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/3 "2020-09-04T11:47:57Z")

</div>

Hi @Andy_B 🙂  
Can i ask you why you have decided to have those button on a table instead of having then in the canvas, maybe in a dedicated page? (This not having seen your doc yet, it’s locked!)  
If that is impossible for x reason, you can “build” column buttons to read thisrow.other column (that change row by row) so it should not be a problem to do that, also, in extreme case, missing better option, you can always build an “if button” like if this is this so do that, if not do this instead, ecc…  
I’ll wait the doc to understand better your case 🙂

---

<div class="post-metadata">

**Author:** ![Andy\_B](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/andy_b/32/6915_2.png) [@Andy\_B](https://connect.superhuman.com/u/Andy_B)\
**Post date:** [September 4, 2020, 11:12pm UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/4 "2020-09-04T23:12:11Z")

</div>

Heres a link to the example doc.  
[https://coda.io/@outsourcedigital/row-unique-buttons](https://coda.io/@outsourcedigital/row-unique-buttons)

---

<div class="post-metadata">

**Author:** ![Andy\_B](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/andy_b/32/6915_2.png) [@Andy\_B](https://connect.superhuman.com/u/Andy_B)\
**Post date:** [September 4, 2020, 11:12pm UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/5 "2020-09-04T23:12:56Z")

</div>

Hi Mario, heres a link to the example doc and you can see the question page which I think should answer your question.  
[https://coda.io/@outsourcedigital/row-unique-buttons](https://coda.io/@outsourcedigital/row-unique-buttons)

---

<div class="post-metadata">

**Author:** ![Johg\_Ananda](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/johg_ananda/32/13930_2.png) [@Johg\_Ananda](https://connect.superhuman.com/u/Johg_Ananda)\
**Post date:** [September 5, 2020, 12:09am UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/6 "2020-09-05T00:09:14Z")

</div>

OK this was fun to think about. My strategy involves to create independent canvas buttons that each represent the actions you want to customize/chain together.

Create a table a list/array of the buttons, with each row holding the button respective to the row position; row 1 represents button position 1 in the array, row 2 : button 2, etc.

Then create a control table, the human interface, where a multiselect lookup column allows us to choose the button/rows that we want; each representing the actions to chain together and run. The user (multi) selects the rows / actions.

In this example each button is named A,B,C… and opens its respective wikipedia article. The last button in Interface `[Open A,C]` is the proof of concept; pressing it opens both articles in separate windows.

You can now change the formulas for the respective buttons to add, modify, delete rows and other Coda actions.

https://coda.io/embed/WO6A3M4ZIe/_suqDg?viewMode=embedplay&hideSections=true

---

<div class="post-metadata">

**Author:** ![Mario](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/mario/32/12232_2.png) [@Mario](https://connect.superhuman.com/u/Mario)\
**Post date:** [September 5, 2020, 10:16am UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/7 "2020-09-05T10:16:14Z")

</div>

Hi @Andy_B, thanks for sharing the doc 🙂

Notes: as @Johg_Ananda have already posted a nice solution (good looking, probably well made and working fine, i haven’t tested it 😅) i will not re-start with the explanation but instead i’ll take Johg steps and comment them 🙂

We can divide the solution in 3 steps:

1. having all the button that you need placed and working!  
this means that you have to set up all the buttons that later you will be “pressing” in all the table where they are needed.  
(p.s. be careful with button use regarding ‘coda best practice’ done by the amazing @Paul_Danyliuk, they can be really heavyweight in the final doc! more info here:

> [@This doc is too big to sync](https://connect.superhuman.com/t/this-doc-is-too-big-to-sync/12848/7):
>
> Here are a few very short facts. I’ll expand on these in my blog when I have more time. The doc size limit is 125 megabytes. This is 0.json (schema file) and 1.json (data file) size combined in their uncompressed form: When the doc goes over this limit it becomes “too big” and you won’t be able to access it through API / Cross-doc, and automations will most likely not run either. You’ll still be able to open it in your browser — it just won’t open on Coda servers for automation/API…

1. create a dashboard page where you place all the needed buttons, the one that will RunActions to press the other made in the 1) point (this can be achieved both with canvas buttons or with table buttons, chose your preferred one 🙂 )

2. Configure and test your button to work properly  
this in the longer part obv, and based on your shared doc i can see that you have already a basic understanding in how RunActions works, just let me share my way 🙂

* * *

Your current way of setting up buttons:  
 ![Screenshot 2020-09-05 at 11.58.02](https://global.discourse-cdn.com/coda1/original/3X/8/f/8f2435d5f2e855e08ef830799be620a0f76e1eb8.png)

What you are telling coda here it’s  
“Press ALL the buttons that are in the table ‘TEST TABLE BTN 1’, the one in the column BTN”

* * *

My proposed way is this one:  
 ![Screenshot 2020-09-05 at 11.59.36](https://global.discourse-cdn.com/coda1/original/3X/5/e/5e046ae2d0b5883ad87035270fc9b3706febf618.png)

What i’m saying here is similar but with more freedom 🙂  
“Press ALL the buttons that are in the table ‘TEST TABLE BTN 1’ and satisfy the given filter (in this case a stupid checkbox check).the one in the column BTN”

If you want you could have also other button column to recall, to create more peculiar setups  
In the same formula you can play as you like with various conditional “if()” or retrive data in a give table/cell to modify the output of the actions, and blablabla 🙂  
More info here:

> [@How to perform multiple actions with a single button (or, how to use RunActions()!)](https://connect.superhuman.com/t/how-to-perform-multiple-actions-with-a-single-button-or-how-to-use-runactions/15183/3):
>
> Ooh, there’s so much more to that! If/Switch/SwitchIf work within actions: If( thisRow.Done, SomeTable.AddRow(...), OtherTable.Filter(...).DeleteRows() ) Use \_Noop() (no operation) if you only need to do something if the condition is true but nothing if it’s false: If( thisRow.Done, thisRow.DeleteRows(), \_Noop() ) FormulaMap() works within actions: Projects.Filter(...).FormulaMap(RunActions( thisRow.ModifyRows([\_Current project], CurrentValue), Tasks.Filter(Project = th…

hope that helps, update us on your progess!!! 😃

---

<div class="post-metadata">

**Author:** ![Paul\_Danyliuk](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/paul_danyliuk/32/27228_2.png) [@Paul\_Danyliuk](https://connect.superhuman.com/u/Paul_Danyliuk)\
**Post date:** [September 5, 2020, 1:27pm UTC](https://connect.superhuman.com/t/row-unique-buttons-actions/18126/8 "2020-09-05T13:27:49Z")

</div>

Hey @Andy_B,

I haven’t read the replies closely, but I agree that most likely you need to approach your requirement differently. You can always have an `SwitchIf()` statement that would press different buttons based on different column value, and that would probably be the safest option.

For answer completeness sake though, it’s possible to dynamically specify button code using some black magic and deep control object modification:

https://coda.io/embed/zPWzJFQEzr/_suFTb?viewMode=embedplay&hideSections=true

As you can see though, the “compiled” action code is a bit different from the formula language, so you cannot just use the code you normally type.

This is not an encouraged solution though!
