# Why my code doesn't work every time I press the button

**URL:** <https://community.thunkable.com/t/why-my-code-doesnt-work-every-time-i-press-the-button/70684>\
**Category:** Questions about Thunkable X\
**Created:** [February 28, 2019, 5:40pm UTC](https://community.thunkable.com/t/why-my-code-doesnt-work-every-time-i-press-the-button/70684 "2019-02-28T17:40:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kacper\_Paszter](https://avatars.discourse-cdn.com/v4/letter/k/96bed5/32.png) [@Kacper\_Paszter](https://community.thunkable.com/u/Kacper_Paszter)\
**Post date:** [February 28, 2019, 5:40pm UTC](https://community.thunkable.com/t/why-my-code-doesnt-work-every-time-i-press-the-button/70684/1 "2019-02-28T17:40:18Z")

</div>

I made a code that filters my list\_viewer when I press the button. But it only filters properly after second press as you can see. The number shows how many items should be shown.  
[https://drive.google.com/open?id=1fY\_XfVYc2HFU](https://drive.google.com/open?id=1fY_XfVYc2HFU) qZoa3GgXTvAz351QkDvn  
[https://drive.google.com/open?id=1fY\_XfVYc2HFUqZoa3GgXTvAz351QkDvn](https://drive.google.com/open?id=1fY_XfVYc2HFUqZoa3GgXTvAz351QkDvn)

---

<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:16pm UTC](https://community.thunkable.com/t/why-my-code-doesnt-work-every-time-i-press-the-button/70684/2 "2024-11-08T12:16:11Z")

</div>


