# \[Solved\] How to choose between two pages randomly

**URL:** <https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891>\
**Category:** Questions about Thunkable X\
**Tags:** solved, randomnumber, navigate-screen\
**Created:** [March 7, 2021, 8:41pm UTC](https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891 "2021-03-07T20:41:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![william.roewhite2007](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@william.roewhite2007](https://community.thunkable.com/u/william.roewhite2007)\
**Post date:** [March 7, 2021, 8:41pm UTC](https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891/1 "2021-03-07T20:41:42Z")

</div>

Basically, I have a button, I want it to choose between two different pages and choose one to navigate to. How do I do that?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [March 7, 2021, 9:08pm UTC](https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891/2 "2021-03-07T21:08:14Z")

</div>

I’m not sure if I understand you but if you want to user to select which screen to go to then you can do that with an `Alert` component and then check what the user selected.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/2/72e61efd1be68240fa20e6de2031871c53fe01e2.png)  
This is the Alert when the user clicks on Button1

And this is the code of Button1  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/c/0c12a506a6a3ec8c5e306af0c4a2d70f297e7190.png)

Hope this helps.

---

<div class="post-metadata">

**Author:** ![william.roewhite2007](https://avatars.discourse-cdn.com/v4/letter/w/a5b964/32.png) [@william.roewhite2007](https://community.thunkable.com/u/william.roewhite2007)\
**Post date:** [March 10, 2021, 12:01am UTC](https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891/3 "2021-03-10T00:01:35Z")

</div>

No, what I want is a button that picks a random page (out of 2) which it will then navigate to.  
Example  
[button] - Chooses 1 - Navigate to page Home - Chooses 2 - Navigate to a separate screen.  
Thanks!

---

<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:** [March 10, 2021, 6:25am UTC](https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891/4 "2021-03-10T06:25:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/6/9696c31ddbba9d250a63ed8f83a130dfe14add46.png)

---

<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, 1:28pm UTC](https://community.thunkable.com/t/solved-how-to-choose-between-two-pages-randomly/1150891/5 "2024-11-08T13:28:57Z")

</div>


