# How to clear the function?

**URL:** <https://community.thunkable.com/t/how-to-clear-the-function/328279>\
**Category:** Questions about Thunkable X\
**Created:** [November 19, 2019, 8:42pm UTC](https://community.thunkable.com/t/how-to-clear-the-function/328279 "2019-11-19T20:42:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dementtor414nos](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/dementtor414nos/32/49481_2.png) [@dementtor414nos](https://community.thunkable.com/u/dementtor414nos)\
**Post date:** [November 19, 2019, 8:42pm UTC](https://community.thunkable.com/t/how-to-clear-the-function/328279/1 "2019-11-19T20:42:22Z")

</div>

Hi,  
Do u know how to clear a function and add some new blocks in it? I mean for example if u click a button the first click will open screen 2 but the second click will open screen 3. Thanks in advance.

---

<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 16, 2020, 2:45pm UTC](https://community.thunkable.com/t/how-to-clear-the-function/328279/2 "2020-07-16T14:45:41Z")

</div>

Hey @dementtor414nos,

You could do this with a stored variable that keeps track of the number of times that the button was pressed.

This would be quite common, for example, when the app is first opened prompt the user to sign up, but after they’ve signed up you don’t need to show the sign up screen every time the app has been opened.

---

<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:43am UTC](https://community.thunkable.com/t/how-to-clear-the-function/328279/3 "2024-11-08T11:43:01Z")

</div>


