# How to create a tutorial "first run" logic

**URL:** https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087
**Category:** Canvas / Gaming
**Created:** [February 15, 2024, 8:35am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087 "2024-02-15T08:35:58Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 15, 2024, 8:35am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/1 "2024-02-15T08:35:58Z")

</div>

hi I hope any one can help me to my project, I have a Welcome screen, on the welcome screen I have a Home button I would like it to happen when the user presses the button for the first time it will go to the Introduction screen but when he finishes the Introduction screen the next time he presses the button on the home screen it will go to the menu screen, how do I make it and set it to thunkable blocks, can any one give at least sample set of blocks or guide me to do it?

---

<div class="post-metadata">

### Author: ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)
#### Post date: [February 15, 2024, 8:42am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/2 "2024-02-15T08:42:11Z")

</div>

Use a stored variable where you have to save true or false . Stored variable save data permanent so you can get the value every time the app starts .  
When app start for the first time change the value of the variable from true to false . In button code add a condition  
**If** variable is true  
**Then** change variable value and go to introduction  
**Else** go to menu

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 16, 2024, 8:23am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/3 "2024-02-16T08:23:13Z")

</div>

thank you so much for your reply can you attach sample blocks i can use for that?

---

<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: [February 16, 2024, 8:45am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/4 "2024-02-16T08:45:21Z")

</div>

If you search the forums for “first run”, you will find examples and advice for how to do what you’re wanting.

---

<div class="post-metadata">

### Author: ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)
#### Post date: [February 16, 2024, 5:54pm UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/5 "2024-02-16T17:54:46Z")

</div>

have you searched for your solution ?

This is one way  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/577b695efa356cd59d165729594e6d81db380469.png)

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 21, 2024, 8:03am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/6 "2024-02-21T08:03:17Z")

</div>

Hi, thank you for replying to my question, it helped me a lot. I still have something to ask again, I hope you can help me again. I have a sample of the score block that I copied from thunkable’s youtube tutorial and it works what I would like to do is take the first 4 attiempted scores of the user and put it in the data base I have already created a data base that is connected to the scoreboard where 4 scores will be taken. My problem is that I don’t know how to get the 4 attiempt score of the user and how to put it in the data base

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 21, 2024, 8:13am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/7 "2024-02-21T08:13:59Z")

</div>

![428206904_368478342660495_7493663021512523982_n](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/f/7fcf4376fd38306879f337403f27ad4beef368a5.jpeg)  
here is my score blocks

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 21, 2024, 8:15am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/8 "2024-02-21T08:15:02Z")

</div>

![428093054_7162226673868377_215263790880643101_n](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/3/c3101303adfd5476d37cb2579a4e81e33c3622b4.jpeg)  
here is my scoreboard blocks

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 21, 2024, 8:16am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/9 "2024-02-21T08:16:08Z")

</div>

![428084139_780903090635791_3326099124315676175_n](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/6/66c9444ea2d0331b378a2b85df23a2686301bf63.jpeg)  
and here is my database

---

<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: [February 21, 2024, 8:49am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/10 "2024-02-21T08:49:07Z")

</div>

The hard level scores are in row #5 in your data source but you are getting values from row #4. The header row (Type of Level, 1st Attempt, etc.) is also a row. It’s row #1. So you have to include it when counting your rows.

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 22, 2024, 2:10am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/11 "2024-02-22T02:10:57Z")

</div>

I got it. now what should I do so that I can record the user’s score in his first 4 attempts and put the obtained score in the database?

---

<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: [February 22, 2024, 2:32am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/12 "2024-02-22T02:32:51Z")

</div>

You can just update the values in each of those cells for that row.

---

<div class="post-metadata">

### Author: ![kikopaje00000b53v](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@kikopaje00000b53v](https://community.thunkable.com/u/kikopaje00000b53v)
#### Post date: [February 22, 2024, 2:39am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/13 "2024-02-22T02:39:14Z")

</div>

Isn’t it possible that after the user plays, his score will automatically go to the database and he can view his score on the score board?

---

<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: [February 22, 2024, 5:44am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/14 "2024-02-22T05:44:57Z")

</div>

Automatically? Things don’t generally happen automatically in Thunkable. You’re the developer. You’re coding every action. So if you want the score to change in the database then you need to code that.

A simple algorithm for most programming languages/tools is:

```auto
If/While/When... (an event)
   Do something (an action)

```

Without an event and an action, nothing is going to happen!

---

<div class="post-metadata">

### Author: ![salmannawaz1724xjqj0](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/salmannawaz1724xjqj0/32/173858_2.png) [@salmannawaz1724xjqj0](https://community.thunkable.com/u/salmannawaz1724xjqj0)
#### Post date: [March 18, 2024, 7:14am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/15 "2024-03-18T07:14:18Z")

</div>

its not working i dont know why  
 ![errro](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/c/bcb00c0c9794929d769673c8ac5cfded1d399db8.jpeg)  
maybe coz i am testing it in thunkable testing app is it right , if not pease help please

---

<div class="post-metadata">

### Author: ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)
#### Post date: [March 18, 2024, 8:09am UTC](https://community.thunkable.com/t/how-to-create-a-tutorial-first-run-logic/2835087/16 "2024-03-18T08:09:50Z")

</div>

> [@salmannawaz1724xjqj0](#):
>
> maybe coz i am testing it in thunkable testing app is it right , if not pease help please

It worked the first time you run the code ? You reset the variable before test it again ?
