# Help needed with drop down menus

**URL:** https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888
**Category:** Questions about Thunkable X
**Created:** [November 9, 2021, 3:08am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888 "2021-11-09T03:08:10Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)
#### Post date: [November 9, 2021, 3:08am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/1 "2021-11-09T03:08:10Z")

</div>

Hi,

I have an app that allows students to enter their lessons into a schedule. The lessons are displayed in a list and the user selects one to add that lessons to the schedule. Here is what the screen looks like:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/1/719b2926e852e94edad6dadaafe796ec6cdc0060.png)

When a user selects a subject, it is added to the first available text input. I want to implement a ‘back’ button which removes the text of the last filled text input. I have developed a procedure but I can not get it to work:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/4/744a296c991e51ea9bc43351faf365def6c65ee7.png)

Here is a link to the project:

[https://x.thunkable.com/copy/c4263d1e32606aba5e51e2d01eae7712](https://x.thunkable.com/copy/c4263d1e32606aba5e51e2d01eae7712)

Any help would be much appreciated.

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: [November 9, 2021, 3:30am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/2 "2021-11-09T03:30:12Z")

</div>

Why don’t you store the text input count when filling those components? If you create a variable called something like lastInputNumber and start it at 0, you can increase it by one each time a list viewer item is clicked.

Then, when the user clicks the back button, you just do `in list all text input in Set Up Timetable set # app variable lastInputNumber to ""`. And decrease lastInputNumber by 1.

Then there’s no need for a loop.

---

<div class="post-metadata">

### Author: ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)
#### Post date: [November 18, 2021, 8:17am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/3 "2021-11-18T08:17:13Z")

</div>

Hi @tatiang thanks for your advise. I have tried implementing this however, it is not working. Here is what I have made:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/7/87201b07e6a76b0701bac8afa5591a37c9db8cc3.png)

---

<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: [November 18, 2021, 8:23am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/4 "2021-11-18T08:23:39Z")

</div>

Is there a reason you’re subtracting 1 from `app variable last input number`? If that value starts at 0 and gets increased by 1 when an item is clicked, then it would be 1 after the first item is clicked and if you subtract 1, you get 0 meaning that you’d be setting list item #0 which isn’t possible.

I know that might be confusing… just wondering why you have that subtraction in the `when back Click` section.

 ![87201b07e6a76b0701bac8afa5591a37c9db8cc3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/1/f1a9962bffc4d8fbfdb0c626c3e832dc7b94dcbf.png)

---

<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: [November 18, 2021, 8:32am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/5 "2021-11-18T08:32:25Z")

</div>

Oh wait, I just noticed that you’re setting the list item to “” but I think you need this Any Component “set” block instead:

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

---

<div class="post-metadata">

### Author: ![jakeheron](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jakeheron/32/116818_2.png) [@jakeheron](https://community.thunkable.com/u/jakeheron)
#### Post date: [November 18, 2021, 9:34am UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/6 "2021-11-18T09:34:51Z")

</div>

Thank you very much @tatiang , it works now. 🙂

---

<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:14pm UTC](https://community.thunkable.com/t/help-needed-with-drop-down-menus/1604888/7 "2024-11-08T13:14:29Z")

</div>


