# \[Solved\] Question about Any Button Click event

**URL:** <https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [September 1, 2020, 11:19pm UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162 "2020-09-01T23:19:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrtwocanes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mrtwocanes/32/32268_2.png) [@mrtwocanes](https://community.thunkable.com/u/mrtwocanes)\
**Post date:** [September 1, 2020, 11:19pm UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/1 "2020-09-01T23:19:35Z")

</div>

I have a button, btnSwitchesSave, that is NOT in the column called colSwitchesRows, but “Any Button Click” fires this button anyway. The button is  
outside the “foreach item j in list” loop, but the button still fires off the web viewer.  
 ![Screenshot from 2020-09-01 15-51-36](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b13024cd822ecd2d1801170fcad4c789498298fa.png)  
The button, btnSwitchesSave, is physically in a row below the column colSwitchesRows. Each time the Save button is clicked, the Alert fires off, but the web viewer fires at the same time.

Any help is as always, greatly appreciated.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [September 2, 2020, 12:16am UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/2 "2020-09-02T00:16:28Z")

</div>

It sounds like a bug. If you can share a link to the project, that would be helpful. If not, I would try moving the btnSwitchesSave button into the colSwitchesRows column and then back out again. If that doesn’t fix the issue, maybe try clearing the browser cache?

---

<div class="post-metadata">

**Author:** ![mrtwocanes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mrtwocanes/32/32268_2.png) [@mrtwocanes](https://community.thunkable.com/u/mrtwocanes)\
**Post date:** [September 2, 2020, 12:56am UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/3 "2020-09-02T00:56:28Z")

</div>

Thanks, tatiang, for the suggestions, unfortunately, neither worked. I have set up a public project that demonstrates the problem.

[https://x.thunkable.com/projects/5f4ef40c41fe936e1594fdc5/187c5768-542f-4410-a2c9-8c7ad368623e/designer](https://x.thunkable.com/projects/5f4ef40c41fe936e1594fdc5/187c5768-542f-4410-a2c9-8c7ad368623e/designer)

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [September 2, 2020, 10:29am UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/5 "2020-09-02T10:29:04Z")

</div>

> [@mrtwocanes](#):
>
> I have a button, btnSwitchesSave, that is NOT in the column called colSwitchesRows, but “Any Button Click” fires this button anyway.

This makes sense - the event will fire when any button is clicked. You need to add some logic to check whether or not the clicked button is in `colSwitchesRows`.

For example, I have 3 buttons in one col that I want grouped together and button 4 should not be part fo the “Any Button Click” logic:

 ![Screenshot 2020-09-02 at 11.27.43](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cdf11d8cb79ae40ed06d96cc4f1242b7bdcfc2fd.png)

Here’s a demo:  
[https://x.thunkable.com/projectPage/5f36ce49fe739aa0a7349644](https://x.thunkable.com/projectPage/5f36ce49fe739aa0a7349644)

---

<div class="post-metadata">

**Author:** ![mrtwocanes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mrtwocanes/32/32268_2.png) [@mrtwocanes](https://community.thunkable.com/u/mrtwocanes)\
**Post date:** [September 2, 2020, 4:56pm UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/6 "2020-09-02T16:56:33Z")

</div>

Jane was kind enough to give me the solution:  
 ![Screenshot from 2020-09-02 09-54-11](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/1/61fe428f2ec70c270f2f8a180a165d394d4e31c8.png)  
The if does list all Buttons in colSwitchesRows contain component is the  
proper way to check if the button (component) is to be used in Any Button.  
Thanks @jane

---

<div class="post-metadata">

**Author:** ![mrtwocanes](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mrtwocanes/32/32268_2.png) [@mrtwocanes](https://community.thunkable.com/u/mrtwocanes)\
**Post date:** [September 2, 2020, 4:59pm UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/7 "2020-09-02T16:59:19Z")

</div>

Didn’t see your solution until I had seen Jane’s reply in the Chat room.

Thank-you as well.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:24pm UTC](https://community.thunkable.com/t/solved-question-about-any-button-click-event/786162/8 "2024-11-08T12:24:20Z")

</div>


