# \[Solved\] What is the scope of a function?

**URL:** https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754
**Category:** Questions about Thunkable X
**Tags:** solved, function
**Created:** [May 4, 2020, 1:16pm UTC](https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754 "2020-05-04T13:16:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Rumesh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rumesh/32/68408_2.png) [@Rumesh](https://community.thunkable.com/u/Rumesh)
#### Post date: [May 4, 2020, 1:16pm UTC](https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754/1 "2020-05-04T13:16:46Z")

</div>

Do the functions work only within the screen that blocks included?  
or can access across the screens? 🤨

[Variables and invisible components can access across the screens]

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [May 4, 2020, 1:28pm UTC](https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754/2 "2020-05-04T13:28:25Z")

</div>

There is one example of global functions demonstrated by @actech in his Demo App. But this is not a beginner task.

Typically functions work only on the screen they are created. This is also true of the variables created by functions. They are scoped to that screen only meaning you can’t access the values on other screens.

You can, however, copy functions across screens.

---

<div class="post-metadata">

### Author: ![Rumesh](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/rumesh/32/68408_2.png) [@Rumesh](https://community.thunkable.com/u/Rumesh)
#### Post date: [May 4, 2020, 4:35pm UTC](https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754/3 "2020-05-04T16:35:32Z")

</div>

Thanks @jared 🙂  
but Variables and invisible components can access across the screens. Am I correct?

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [May 4, 2020, 4:47pm UTC](https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754/4 "2020-05-04T16:47:53Z")

</div>

Yessir! @Rumesh

---

<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:29am UTC](https://community.thunkable.com/t/solved-what-is-the-scope-of-a-function/564754/5 "2024-11-08T11:29:30Z")

</div>


