# What should I put when no value is found

**URL:** <https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661>\
**Category:** Questions about Thunkable X\
**Created:** [September 30, 2018, 9:43pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661 "2018-09-30T21:43:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)\
**Post date:** [September 30, 2018, 9:43pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/1 "2018-09-30T21:43:58Z")

</div>

Hey !

I have a major issue.

I’m gathering data from firebase, but whatever I enter (data present or not in the database) I always get the else part of my if condition showed below :

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

I’m 100% sure the issue is in the if condition because when I remove it everything works fine. What should i put in value = ?

PS : I also tried changing value to the “namee” variable but nothing will do

`So please can someone make a post with an explanation on when to use an empty string, when to use the "null" string and when to use the null block ?` 🤔

Thanks for helping !  
Nice day 🙂

---

<div class="post-metadata">

**Author:** ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)\
**Post date:** [October 1, 2018, 4:14pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/2 "2018-10-01T16:14:27Z")

</div>

Here I have an example screenshot :

 ![blocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/1/81c44edc8c52518bcb82bce288665ca1011fe909.png)

The part in `green` doesn’t work at all  
The part in `red` only works when the if condition is removed

Hope it helps !

---

<div class="post-metadata">

**Author:** ![User81](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@User81](https://community.thunkable.com/u/User81)\
**Post date:** [October 1, 2018, 5:16pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/3 "2018-10-01T17:16:17Z")

</div>

Hey @AcrobatEpee,

if you use RealtimeDB, you have to use the green null-block. You find it under the other “Logic”-blocks.

Keep thunking,

User81

---

<div class="post-metadata">

**Author:** ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)\
**Post date:** [October 1, 2018, 5:27pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/4 "2018-10-01T17:27:35Z")

</div>

Hey @User81 ! Thanks for the info !

What should I use when I use a Localstorage and when I use a variable ?

Thank you !

---

<div class="post-metadata">

**Author:** ![User81](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@User81](https://community.thunkable.com/u/User81)\
**Post date:** [October 1, 2018, 5:30pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/5 "2018-10-01T17:30:48Z")

</div>

![Untitled](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/7/77eb35a4cabfe91c67185d0cbe66b1d453c652f1.png)

---

<div class="post-metadata">

**Author:** ![User81](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@User81](https://community.thunkable.com/u/User81)\
**Post date:** [October 1, 2018, 5:34pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/6 "2018-10-01T17:34:10Z")

</div>

and always check your “value”-components twice. sometimes they mess up and you have to clear them all and then get them again from the right purple sourceblock.

---

<div class="post-metadata">

**Author:** ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)\
**Post date:** [October 1, 2018, 5:37pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/7 "2018-10-01T17:37:30Z")

</div>

I’ll do that very often, thanks for the tip !

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/6/d61ca2f60fa7ba235c80a2c6dc51d60b230ef8e4.png)

In this fonction I never get the choice to the value 1 even if the condition is fulfilled, do you see a reason to that ? Thanks !

Have a great day @User81 !

---

<div class="post-metadata">

**Author:** ![User81](https://avatars.discourse-cdn.com/v4/letter/u/ba9def/32.png) [@User81](https://community.thunkable.com/u/User81)\
**Post date:** [October 2, 2018, 1:32am UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/8 "2018-10-02T01:32:10Z")

</div>

yes, I see the reason very clear: you remember that the repeat loop is like sending people to bring a beer? 🙂  
the repeat loop will be done in 5 milliseconds, then label… in 1 millisecond, then if…then…else if… in 5 milliseconds.

And then after 500 -3000 milliseconds the then-do-section will trigger(people come back with beer and count is set.

by the way: was the null-problem solved?

---

<div class="post-metadata">

**Author:** ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)\
**Post date:** [October 2, 2018, 7:58am UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/9 "2018-10-02T07:58:59Z")

</div>

Oh yeah that loop. I should start watching and understanding this one so I can fix all my issues.

Ans yeah the null problem was fixed thanks to you !

---

<div class="post-metadata">

**Author:** ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)\
**Post date:** [October 2, 2018, 10:21pm UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/10 "2018-10-02T22:21:18Z")

</div>

Just a note that in almost all cases the best and easiest way to check for an error in a `'then do'` section of a block is to simply test for `'if error'`. That is:

![51%20PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/e/eebc09679516a240af45d91ffa350e31f4dd13c7.png)

That `'error'` value will be a string describing the error.

Unfortunately the Local Storage component is the one case where we don’t (yet) provide an `'error'` block. We do, however, return the **string** “null” when there is no value from the Get block for the given key. The choice of returning a string, rather than a real null value (i.e. the “green null block”) was probably a bad choice on our part ☹

-Mark

---

<div class="post-metadata">

**Author:** ![AcrobatEpee](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/acrobatepee/32/26336_2.png) [@AcrobatEpee](https://community.thunkable.com/u/AcrobatEpee)\
**Post date:** [October 3, 2018, 7:23am UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/11 "2018-10-03T07:23:45Z")

</div>

We’ll deal with it, thanks for the info !

---

<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:55am UTC](https://community.thunkable.com/t/what-should-i-put-when-no-value-is-found/49661/12 "2024-11-08T11:55:18Z")

</div>


