# Alert with button list problem

**URL:** <https://community.thunkable.com/t/alert-with-button-list-problem/648477>\
**Category:** Questions about Thunkable X\
**Tags:** alert\
**Created:** [July 1, 2020, 8:30am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477 "2020-07-01T08:30:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![label1.visible-true](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@label1.visible-true](https://community.thunkable.com/u/label1.visible-true)\
**Post date:** [July 1, 2020, 8:30am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/1 "2020-07-01T08:30:48Z")

</div>

Hi, I’m using an alert with button list, set in the designer part. However, how can I know **which** button does the user clicked?

---

<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:** [July 1, 2020, 10:14am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/2 "2020-07-01T10:14:51Z")

</div>

Hey @label1.visible-true

What do you want to do with that information?

i.e. can you just display the text from the label, or will you need a parallel list to display the appropriate value?

For example, here’s a screen with 5 buttons:

 ![Screenshot 2020-07-01 at 11.19.01](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/7/37df7d056a5240660bee671461717ab4ea24b694.png)

and then clicking on each buttons returns it’s individual position in the list of buttons:

 ![Screenshot 2020-07-01 at 11.19.06](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/4/14cc6f9d4922401f3cb4a6313c5f89495ae31c1b.png)

---

<div class="post-metadata">

**Author:** ![label1.visible-true](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@label1.visible-true](https://community.thunkable.com/u/label1.visible-true)\
**Post date:** [July 1, 2020, 10:49am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/3 "2020-07-01T10:49:02Z")

</div>

I am talking about the alert button.  
I am wondering if anything can tell me which button is pressed.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/d/2dd986511a4c272aceb93507b269b16e5c909543.png)

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [July 1, 2020, 10:49am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/4 "2020-07-01T10:49:21Z")

</div>

Hi there,

The ‘showButtonList’ block will return an output called ‘buttonPressed’.  
This will return the position of the Button in your Button List.  
You can take some action based on which button was pressed.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce91328214d04a2e00030152a1feacd64f911827.png)

You can find more info about the Button List of the Alert in the [Alert](https://docs.thunkable.com/alert#button-list-alert-with-three-or-more-buttons) docs.

---

<div class="post-metadata">

**Author:** ![label1.visible-true](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@label1.visible-true](https://community.thunkable.com/u/label1.visible-true)\
**Post date:** [July 1, 2020, 11:58am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/5 "2020-07-01T11:58:33Z")

</div>

@jane Thank you very much! That’s what I am asking for.  
Just to confirm, in this image  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/3/73b2fe45773446a5aa9f9c894824fb67cb3811d9.png)  
“Sure” is number 1  
“No thanks” is number 2  
“Don’t show that again” is number 3  
Am I right?

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [July 1, 2020, 12:23pm UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/6 "2020-07-01T12:23:09Z")

</div>

Assuming you mean “Later”, as seen in the image, and not “no thanks”, which I don’t see in this screenshot, then yes, that’s correct.

The Buttons may appear in a different order when Live Testing the app on a device, but the number that ‘buttonPressed’ returns is the order that the Buttons are added in the app project.

---

<div class="post-metadata">

**Author:** ![label1.visible-true](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@label1.visible-true](https://community.thunkable.com/u/label1.visible-true)\
**Post date:** [July 1, 2020, 1:00pm UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/7 "2020-07-01T13:00:38Z")

</div>

> [@jane](#):
>
> and not “no thanks”

oops 😅

> [@jane](#):
>
> but the number that ‘buttonPressed’ returns is the order that the Buttons are added in the app project.

Thank you very much.

Btw, it is not stated in the documentation, will you or other staff add it?

---

<div class="post-metadata">

**Author:** ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)\
**Post date:** [July 1, 2020, 1:49pm UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/8 "2020-07-01T13:49:24Z")

</div>

I’ll add that note, thanks for the feedback!

---

<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, 11:25am UTC](https://community.thunkable.com/t/alert-with-button-list-problem/648477/9 "2024-11-08T11:25:14Z")

</div>


