# Button badge if pressed

**URL:** <https://connect.superhuman.com/t/button-badge-if-pressed/34757>\
**Category:** Ask the Community\
**Created:** [October 22, 2022, 9:24pm UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757 "2022-10-22T21:24:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikki\_Donkin](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nikki_donkin/32/16789_2.png) [@Nikki\_Donkin](https://connect.superhuman.com/u/Nikki_Donkin)\
**Post date:** [October 22, 2022, 9:24pm UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/1 "2022-10-22T21:24:55Z")

</div>

Hi community!

I’m trying to implement some way to know if a button has been pressed? I have a document that adds a row to a document with data whenever a button is pressed, however, I have to scroll to the bottom of the document to see what the last row added was to know if a button has been pressed. Is there a way to add a badge or something if it’s been pressed? I have another button that has the option to show a results column when it’s been pressed (email button), but this add row button doesn’t have that option?

Thank you!

---

<div class="post-metadata">

**Author:** ![Quentin\_Morel](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/quentin_morel/32/31407_2.png) [@Quentin\_Morel](https://connect.superhuman.com/u/Quentin_Morel)\
**Post date:** [October 23, 2022, 12:00am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/2 "2022-10-23T00:00:29Z")

</div>

Hi @Nikki_Donkin

You can create yourself a tracker to easily check that !

**If the button is in a table**

Just create a “Tracker” Column, and add to your button the function `RunActions(action 1, action 2, etc...)`  
Set the actions you need in the RunActions, and at the end, put a final action `ModifyRows` to modify your tracker column.

See the example below, in my case I want to modify status to “done”, and to track the push I put the date/time whenI last pushed the button _(I separated the two modifyrows function on purpose for the example, assuming that you may have anything as first action)_

 ![image](https://global.discourse-cdn.com/coda1/original/3X/7/e/7e867b8502c98940b8a0a734620b47e36a5536cd.png)

**if the button is outside a table**

This is exactly the same, but create a control in your page (texte for example, toggle or watever, and us `SetControlValue`)

![CPT2210230158-391x163](https://global.discourse-cdn.com/coda1/original/3X/3/e/3edadb3e72e9b80e8b53355efc94bf6c9380a49e.gif)

![image](https://global.discourse-cdn.com/coda1/original/3X/f/5/f5d357eb04fc1011496b2e8abf1a9ef273fa0793.png)

Hope this helps!

Quentin

---

<div class="post-metadata">

**Author:** ![Quentin\_Morel](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/quentin_morel/32/31407_2.png) [@Quentin\_Morel](https://connect.superhuman.com/u/Quentin_Morel)\
**Post date:** [October 23, 2022, 12:11am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/3 "2022-10-23T00:11:05Z")

</div>

And the badge is indeed a good idea. You can easily adapt this. Considering my second example, we can check **how many times** your did push your button. Use your tracker to increment this number

 ![image](https://global.discourse-cdn.com/coda1/original/3X/8/c/8c3955c5f30a7b7d2eb108fc5b651add7658279d.png)

And set the badge to the value of your tracker, tracker you may put in some hidden pages 😉

 ![image](https://global.discourse-cdn.com/coda1/original/3X/6/1/61b70e2e87deaf4f02f89566ea94e4972c1b2378.png)

This is not necessarily the best way to know that the button has been pushed, but I think you see the point now, and how to customize it to fit your needs !

---

<div class="post-metadata">

**Author:** ![Nikki\_Donkin](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nikki_donkin/32/16789_2.png) [@Nikki\_Donkin](https://connect.superhuman.com/u/Nikki_Donkin)\
**Post date:** [October 23, 2022, 1:59am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/4 "2022-10-23T01:59:43Z")

</div>

Hey Quentin, thanks so much for a reply! I tried to implent the first option into my current button formula, but it didn’t work, perhaps my formula isn’t written in a way that can incorporate it?

```auto
Sequence(1, thisRow.[Order Number].split(",").Count())
  .FormulaMap(
    Addrow(
      [Orders Separated],
      [Orders Separated].[Line Item],thisRow.[Line Items Split].Nth(CurrentValue),
      [Orders Separated].Order,thisRow.[Order Number Split].Nth(CurrentValue),
            [Orders Separated].SKU,thisRow.[SKU Split].Nth(CurrentValue),
      [Orders Separated].Quantity,thisRow.[Volume Split].Nth(CurrentValue), [Orders Separated].[Order Tags] ,thisRow.Tags,[Orders Separated].Fulfillment ,thisRow.[Fulfillment Status]
    )
    )

```

---

<div class="post-metadata">

**Author:** ![Quentin\_Morel](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/quentin_morel/32/31407_2.png) [@Quentin\_Morel](https://connect.superhuman.com/u/Quentin_Morel)\
**Post date:** [October 23, 2022, 5:54am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/5 "2022-10-23T05:54:35Z")

</div>

Hi @Nikki_Donkin,

to check that, would you at least score some screenshots, for better undestanding ?

---

<div class="post-metadata">

**Author:** ![Nikki\_Donkin](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nikki_donkin/32/16789_2.png) [@Nikki\_Donkin](https://connect.superhuman.com/u/Nikki_Donkin)\
**Post date:** [October 23, 2022, 7:48pm UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/6 "2022-10-23T19:48:08Z")

</div>

Thanks Quentin! see below screenshots - its a document for my shopify store 🙂

 ![image](https://global.discourse-cdn.com/coda1/original/3X/1/7/175a6ca93941417474be99a093e4a205d050620f.png)

The button separates it out into a table with individual line items instead of in one row etc

 ![image](https://global.discourse-cdn.com/coda1/original/3X/a/f/af21b6757efb6095f0641cb972a41dafea0774d0.png)

---

<div class="post-metadata">

**Author:** ![Quentin\_Morel](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/quentin_morel/32/31407_2.png) [@Quentin\_Morel](https://connect.superhuman.com/u/Quentin_Morel)\
**Post date:** [October 23, 2022, 8:07pm UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/7 "2022-10-23T20:07:05Z")

</div>

Hi @Nikki_Donkin  
I understand what you’re trying to do, but may be you have some hidden columns, cause I dont find all the reference of your formula in your table.

Are you sure all your “X Split” columns \*do really contains split data ?  
If yes, the formula should work

![CPT2210232205-664x484](https://global.discourse-cdn.com/coda1/original/3X/b/6/b6e2a60753dd4f01c00c59d64019ebc9c1ad2d23.gif)

but I would need to see your doc to make sure every column is ok. Do not hesitate to make a dm to share the doc if private.

Also, is that OK with the button tracker ? This was your first request, but I dont see it in the formula you paste 😉

---

<div class="post-metadata">

**Author:** ![Nikki\_Donkin](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nikki_donkin/32/16789_2.png) [@Nikki\_Donkin](https://connect.superhuman.com/u/Nikki_Donkin)\
**Post date:** [October 24, 2022, 12:02am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/8 "2022-10-24T00:02:10Z")

</div>

Hey Quentin, I’ll send you a DM with the link. I tried adding in the button tracker to my code but it wouldn’t work, so I must have been doing something wrong haha

---

<div class="post-metadata">

**Author:** ![Quentin\_Morel](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/quentin_morel/32/31407_2.png) [@Quentin\_Morel](https://connect.superhuman.com/u/Quentin_Morel)\
**Post date:** [October 24, 2022, 4:57am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/9 "2022-10-24T04:57:41Z")

</div>

Hi @Nikki_Donkin , I set the button tracker in your doc directly. Can yon confirm this is OK  
Thanks,  
Quentin

---

<div class="post-metadata">

**Author:** ![system](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/system/32/24484_2.png) [@system](https://connect.superhuman.com/u/system)\
**Post date:** [January 22, 2023, 4:58am UTC](https://connect.superhuman.com/t/button-badge-if-pressed/34757/10 "2023-01-22T04:58:15Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
