# Problem with if, else

**URL:** https://community.thunkable.com/t/problem-with-if-else/2882428
**Category:** Questions about Thunkable X
**Tags:** beginner
**Created:** [March 8, 2024, 4:45pm UTC](https://community.thunkable.com/t/problem-with-if-else/2882428 "2024-03-08T16:45:44Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 8, 2024, 4:45pm UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/1 "2024-03-08T16:45:44Z")

</div>

![IMG_20240308_105514](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/2/c2047bf28798c7c9d730cba1d312699edc2f4ef4.jpeg)  
What is the wrong with this block … if true it do nothing, but if false the alert appear.

How can i fix it to work writly.

---

<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: [March 8, 2024, 4:54pm UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/2 "2024-03-08T16:54:37Z")

</div>

Hi and welcome to Thunkable!

It sounds like the `if` condition is not returning true. Thunkable blocks don’t just “do nothing.” So when the `if` condition returns true, it will navigate to a different screen.

So the question to solve here is: why does the `if` condition not return a value of true?

See this topic for some suggestions you can try instead of the `is empty` block: [Is the TextInput Empty?](https://community.thunkable.com/t/is-the-textinput-empty/384509)

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 8, 2024, 5:30pm UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/3 "2024-03-08T17:30:06Z")

</div>

Thank you for your quick response…and I apologize if I have misinterpreted it, as of course I do not mean to offend.

I am making an application where the user submits a query and then an official responds to it. So I want the application to check when an official initiates a response. If the response has been completed, he will be shown the message “Responded before.” Otherwise, he will be directed to the response page.

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 9, 2024, 6:03am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/4 "2024-03-09T06:03:11Z")

</div>

I read the topic referred to, and tried the two suggestions as shown in the pictures, but they both failed… Is there a way to solve it?

 ![IMG_20240309_075714](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/a/faecde4220c988c706b885ddf757c7a6f2fe86fd.jpeg)  
 ![IMG_20240309_075954](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/31dd66d5fc8647667784b091e63ada4d1603dfa9.jpeg)

---

<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: [March 9, 2024, 6:48am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/5 "2024-03-09T06:48:17Z")

</div>

What does your spreadsheet data look like?

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 9, 2024, 7:55am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/6 "2024-03-09T07:55:51Z")

</div>

A Google worksheet contains data fields that the user enters, including his question. There is a field for the response that is entered by one of the team responsible for managing the application. I made a data viewer list to show the questions that users ask, but I want to close the matter when he answers it…meaning when an official presses him, he moves to respond, and if a response has been received from another colleague, the warning appears and does not move

---

<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: [March 9, 2024, 10:24am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/7 "2024-03-09T10:24:48Z")

</div>

One problem is that the row id is not an integer value. It’s a long string of characters. So you can’t use it as a list item #. Instead, use the `Get Value from` block with the green `row id` blocks.

If it still doesn’t work, I notice that you’re checking the cells for a value of 0 (a number) and null. How is that column formatted in your data source and what are the possible values of that column’s cells?

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 9, 2024, 10:46am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/8 "2024-03-09T10:46:42Z")

</div>

I tried the “get value from” and still the same problem … the coulmn is formatted as the default (general text) it will contain a text or it will be empty … if it is empty then navigate… if it contains any text the alert show.

---

<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: [March 9, 2024, 5:57pm UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/9 "2024-03-09T17:57:52Z")

</div>

You’ll need to post a screenshot of your blocks or a link to your project. There’s no way to know why it’s not working without seeing your blocks.

So if I’m understanding correctly, you want to check if the cell is empty or not? It doesn’t matter what text is in the cell as long as it is not empty? Because the blocks you have do not check for that at all.

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 9, 2024, 6:17pm UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/10 "2024-03-09T18:17:27Z")

</div>

This is another shot of my screen. It was all previous attempts to achieve the goal I explained to you. You understood what I wanted. Can you help me achieve it? Say what blocks should be used for this

 ![IMG_20240309_201350](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/f/6fde366eb1573f9539d89d315cdcbd5b7e717118.jpeg)

---

<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: [March 10, 2024, 12:28am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/11 "2024-03-10T00:28:44Z")

</div>

Replace the `null` block with this block from the Text drawer:

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

Or just use if `is empty` do… else…:

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

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 10, 2024, 9:00am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/12 "2024-03-10T09:00:47Z")

</div>

![IMG_20240310_105306](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/5/85fa29844603a326b2350471b87b1dd777ae83e6.jpeg)  
 ![IMG_20240310_103418](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/5/75e3e6e8fcb48053f25d10c42e5c973c53d9fe85.jpeg)

I tried the both … but still the problem

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 10, 2024, 9:13am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/13 "2024-03-10T09:13:03Z")

</div>

I tried this too…and the alert appears in both cases

 ![IMG_20240310_110703](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/8/c8756f047012fce987d0910becf67ab952520db8.jpeg)

---

<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: [March 11, 2024, 4:59am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/14 "2024-03-11T04:59:52Z")

</div>

Are you able to share the project link and the spreadsheet (data source) with me? It sounds like the data source values are not empty.

---

<div class="post-metadata">

### Author: ![c.7ooda6r](https://avatars.discourse-cdn.com/v4/letter/c/ebca7d/32.png) [@c.7ooda6r](https://community.thunkable.com/u/c.7ooda6r)
#### Post date: [March 11, 2024, 11:56am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/15 "2024-03-11T11:56:22Z")

</div>

Thank you for your tries to help me… i used an alternative method that is to make a field contains a word referring to the case and made the application check it … it working now

---

<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: [June 9, 2024, 11:57am UTC](https://community.thunkable.com/t/problem-with-if-else/2882428/16 "2024-06-09T11:57:11Z")

</div>

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