# Same blocks in different pages... Could it be done better?

**URL:** https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164
**Category:** Questions about Thunkable X
**Created:** [December 30, 2021, 11:31pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164 "2021-12-30T23:31:51Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 30, 2021, 11:31pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/1 "2021-12-30T23:31:51Z")

</div>

Hello Thunkers. I am working with vocabulary lists to learn a language, and I decided to create different pages, according to the theme they had: let’s say general vocabulary, medical vocabulary… and so on, . But the truth is that most pages contain the same blocks, buttons and pictures, and I’m sure there is a more efficient way to do that than repeating the same pattern. Anyone have any suggestions how to improve it?

 ![Capturathunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/310542b638432c282c007d99f7f22a2e44d60414.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: [December 30, 2021, 11:41pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/2 "2021-12-30T23:41:24Z")

</div>

Yes, this can be done with a single screen. One way is to have a row index variable. You set it to the starting row number for each category.

So your data is arranged in rows like this:

1. general
2. general
3. general
4. medical
5. medical
6. medical
7. medical
8. next topic
9. next topic

Or, you arrange the categories in columns:

```auto
1 2 3     
general medical etc
general medical etc
general medical etc

```

Or, you use Firebase and arrange the data in separate keys and retrieve it when needed.

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 30, 2021, 11:58pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/3 "2021-12-30T23:58:17Z")

</div>

Hi thanks, Tatiang. You are always of great help. The fact is that the structure of each topic is about 4 columns, with about a thousand rows…  
Do you know of any example for this?  
Do I have to make the blocks directly in the Menú page, but should I need a few variables or what? I have the idea, but I don´t really know how to

 ![Capturathunkable2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/9/3977dad2949170c88b1dd38de36fccb08aa58338.png)

---

<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: [December 31, 2021, 12:07am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/4 "2021-12-31T00:07:21Z")

</div>

Check this out

[https://x.thunkable.com/projectPage/5edc557fe6f39247cef3f190](https://x.thunkable.com/projectPage/5edc557fe6f39247cef3f190)

Here’s one way to do it.

Ama

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 31, 2021, 12:10am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/5 "2021-12-31T00:10:41Z")

</div>

Thank you Jared, I’ll have a look at it

---

<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: [December 31, 2021, 12:18am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/6 "2021-12-31T00:18:00Z")

</div>

It’s outdated. I may need to fix it up. Lemme know if anything doesn’t make sense!

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 31, 2021, 12:36am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/7 "2021-12-31T00:36:45Z")

</div>

I think it is a bit too much for me, although I am trying to understand it. It will take a while, and it’s a shame if it’s not up to date  
Thanks a lot.

---

<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: [December 31, 2021, 12:38am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/8 "2021-12-31T00:38:06Z")

</div>

I’ll put out a new one tomorrow at some point!

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 31, 2021, 12:39am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/9 "2021-12-31T00:39:37Z")

</div>

G  
Great

---

<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: [December 31, 2021, 2:30am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/10 "2021-12-31T02:30:35Z")

</div>

It might be the most straightforward to simply use multiple data source blocks. You would add a data source for each category which means each one needs to be on a separate Google Sheet or Airtable view. It’s more coding (more blocks) but it can work.

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 31, 2021, 1:16pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/11 "2021-12-31T13:16:22Z")

</div>

Hi, Thunkers  
I already have a data source for each category, on separate files on Thunkable data source. And it’s working, very very slouly in the phone, and making it a heavy App, but working. And It’s not really more coding (more blocks), because these blocks are just the same, only with different variable names, and poingting to different files. But I was thinking if I really need all of these repetitions.

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 31, 2021, 1:44pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/12 "2021-12-31T13:44:22Z")

</div>

These are the blocks I’m using

 ![Capturathunkable3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/a/0ada6709d7c89b32f5565ff71bc75f5c1bb079ae.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: [December 31, 2021, 6:40pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/13 "2021-12-31T18:40:10Z")

</div>

Accessing stored variables can be a little slow. You can set an app variable to a stored variable’s value, use the app variable in most of your functions, and then update the stored variable only when needed to save that value to the device.

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [December 31, 2021, 7:08pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/14 "2021-12-31T19:08:12Z")

</div>

Thanks Tatiang:  
How do I do that?. I just want to know what is the next word I have to see in the list

---

<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: [December 31, 2021, 7:59pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/15 "2021-12-31T19:59:32Z")

</div>

You just set app variable name to stored variable name. Then use app variable name throughout your code. When you need to change the value of the variable, use the stored variable instead of the app variable. But when you are just referencing/using the value, use the app variable.

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [January 1, 2022, 1:40am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/16 "2022-01-01T01:40:41Z")

</div>

Hi Tatiang.  
Thanks, but I do not know very well which of the blocks should remain as a stored variable, and which as an app variable,

---

<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: [January 1, 2022, 3:29am UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/17 "2022-01-01T03:29:52Z")

</div>

When you set a variable vaue that needs to be saved on the device, use a stored variable and then set the app variable to that stored variable. Any other time, use an app variable. If that still doesn’t make sense, I wouldn’t worry about it for now. It’s probably not going to speed up your app all that much.

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [January 2, 2022, 1:40pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/18 "2022-01-02T13:40:50Z")

</div>

Hi, trying to understand, I’ve made a series of combinations with the blocks I showed to you, but any of them worked fine. Thanks

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [January 10, 2022, 7:14pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/19 "2022-01-10T19:14:18Z")

</div>

Hi, Tatiang,  
Could you point me in the blocks that I have sent you, which are the ones that could be put as you suggest me "When you set a variable value that needs to be saved on the device, use a stored variable and then set the app variable to that stored variable. Any other time, use an app variable. If that still doesn’t make sense, I wouldn’t worry about it for now. It’s probably not going to speed up your app all that much. " I’m pretty desperate trying to find a solution. Thank you

---

<div class="post-metadata">

### Author: ![similar2similar](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@similar2similar](https://community.thunkable.com/u/similar2similar)
#### Post date: [January 10, 2022, 7:22pm UTC](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164/20 "2022-01-10T19:22:50Z")

</div>

The best result I have been able to have is with these block, where I try to do what you suggested… but it doesn´t save the results, so it always starts in the same point, and the first screen doesn´t show any words…

 ![Capturaintento nuevo](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/b/7b5d4ffc152ad4bc86f03b5230310a523479bf91.png)

[Next page](https://community.thunkable.com/t/same-blocks-in-different-pages-could-it-be-done-better/1663164.md?page=2)
