# Why doesn't work?

**URL:** https://community.thunkable.com/t/why-doesnt-work/2421960
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [May 17, 2023, 3:27am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960 "2023-05-17T03:27:22Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 3:27am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/1 "2023-05-17T03:27:22Z")

</div>

Hi. I am looking to make a score counter with answers to questions.  
I created a form with switch to answer all the questions like it :  
 ![4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/1/61668bbe64f31c88e399a86e20134e53903212ba.png)

I tried changing the field in airtable ( Numbers / Text ) and still no results.

An image will be better :

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

So if a swith is in values=True. set some points)  
Add points to get a score.  
Update value in airtable.

After doing a test:

 ![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/7715c1321e1455a5d221c67cc2bb163615b00700.png)

In airtable:

 ![3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/b/fba91aed1b17e7cbdccaedb0076aef9e8c4ef14e.png)

Can’t understand why it doen’t work !  
Thanks for help

---

<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: [May 17, 2023, 4:17am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/2 "2023-05-17T04:17:05Z")

</div>

1. Are some of the switches in the Etape 1 screen set to true on the Design screen (when the screen opens)?

2. What is the value of app variable NoteEtape1 at the _very end_ of the `when Etape 1 Opens` block? Set a label to that variable and then let us know.

3. What is the value of app variable noteglo _before_ you click Button 2?

4. What is the value of the NoteGlo column in Airtable _before_ you click Button2?

5. What is the value of app variable ItemClickID? Set a label to that variable and then let us know.

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 4:31am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/3 "2023-05-17T04:31:57Z")

</div>

To put it simply, the form which is launched when you open the Etape1 screen, All the values of the notes are at 0 because this screen follows the registration.  
The variables are previously defined elsewhere.

No switch is ON in the design.

Pict for all programms :  
Step 1 : Registration of a candidat

 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/93c9d271f4821dcc28675f41c9464ac65abba7c3.png)  
Step 2 :  
Screen of detail of the candidats  
 ![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/3/e33ea7121b489b243da0880dbbc1c57be0b1a489.png)

Screenshot of the airtable after resgistration, before going to the Etape1 screen

 ![3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f5e6223e0ba80550ec4a8fbf51c3c9e1174e3c6.png)

I wonder if it’s the fact that it’s switches that don’t cause any problems.  
I did a test just asking to add the value to the table, and this works :  
 ![4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5e8ed6aaaf5f361085cebf9499a8aed8a80e78f.png)

And this work too ( but i’ll have many block anywhere ) :  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/0069e08019c7719ee6c03b527e66273e9b21a5a6.png)

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 5:08am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/4 "2023-05-17T05:08:55Z")

</div>

Works too …  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/3/135ef85541cc6d5791d4caadf00ae17edc427ae7.png)  
He find 2 points… and write 2 points on airtable…

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 5:17am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/5 "2023-05-17T05:17:42Z")

</div>

Doesn’t work  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cbc43f815444c4472bcc1f0a1d61e5d5655b324e.png)

The problem certainly comes from the statue of the switch.  
True or False does not seem to be a possible value for the switch. The problem is that there is no other possibility proposed to be able to exploit it as I want to do.

---

<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: [May 17, 2023, 5:19am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/6 "2023-05-17T05:19:58Z")

</div>

I’m not sure how to help because I don’t know all of the answers to the questions I asked you. But it sounds like you’ve made more progress so that’s good.

In this image:

![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cbc43f815444c4472bcc1f0a1d61e5d5655b324e.png)

You are setting Switch3’s value to false and then immediately checking to see if Switch3’s value is true. It never will be! Why are you setting it to false right before the `if` block?

Are you expecting the `if` block to _continually_ check the value of the switch? If so, it won’t… you would need a loop for that.

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 5:39am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/7 "2023-05-17T05:39:25Z")

</div>

All answers

Are some of the switches in the Etape 1 screen set to true on the Design screen (when the screen opens)? No. all are to false on the Design screen

What is the value of app variable NoteEtape1 at the very end of the when Etape 1 Opens block? Set a label to that variable and then let us know. Value is 0 when Etape 1 open

What is the value of app variable noteglo before you click Button 2? Value is 0 before click Button 2

What is the value of the NoteGlo column in Airtable before you click Button2? Value is 0 before click Button 2

What is the value of app variable ItemClickID? Set a label to that variable and then let us know. variable ItemClickID is the ID of the candidat on airtable. i forgot to send this :

![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce46dca1bbfcdf742412f04c9c878966a24882b3.png)

You set the value of Switch3 to false, then immediately check if the value of Switch3 is true. It never will be! Why are you setting it to false right before the if block?  
I set it to false to make sure it is false when the page opens. But even without setting it before, it doesn’t work when I change its value while answering the quiz.

Do you expect the if block to constantly check the value of the switch? If so, it won’t… you would need a loop for that.  
When I’m on the form, it’s necessarily false since I defined it that way. But changing its value as if to answer “yes” to the question, so its value changes… so I wanted it to add 1 point since if its value = true then it adds 1 point.

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 5:43am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/8 "2023-05-17T05:43:13Z")

</div>

So I think after several tests that the values of the switch is not True or False but something else that defines its value. Only, no possibility of knowing it.

It’s only my second days on this website’s programs. I’m a baby here 😅.

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 5:51am UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/9 "2023-05-17T05:51:50Z")

</div>

To be very clear, the only thing I’m having trouble with is that I can’t collapse this into a single block  
If a solution exists, I’m a taker.

![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/5/f542fc479745c3fe7b4a6b1942986b07bac1cf1b.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: [May 17, 2023, 2:52pm UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/10 "2023-05-17T14:52:41Z")

</div>

Here is a demo project (see the first screen with your username): [Thunkable](https://x.thunkable.com/copy/b285b2164e7a6363c530988636ab0a4e)

I provided two methods. If you use Any Component blocks, you can do this with a single block for as many switches as you need.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/5/b5a27f634f6548aae6d81266733e7b935a020192.png)

---

<div class="post-metadata">

### Author: ![foot.brunou8y](https://avatars.discourse-cdn.com/v4/letter/f/4491bb/32.png) [@foot.brunou8y](https://community.thunkable.com/u/foot.brunou8y)
#### Post date: [May 17, 2023, 6:12pm UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/11 "2023-05-17T18:12:59Z")

</div>

Ho Thx a lot.

Here, the only thing I was trying to do:  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5f304b47afac7ee9eccc7c55ed4cf6c530ed839e.png)

Works Great ! Thank you for your time you took to me. I need to research a bit more to avoid asking unnecessarily. There’s something else I’m looking for, which I’m breaking my head with but I’m not giving up yet 😅

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [August 15, 2023, 6:13pm UTC](https://community.thunkable.com/t/why-doesnt-work/2421960/12 "2023-08-15T18:13:37Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
