Problem with if, else

IMG_20240308_105514
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.

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?

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.

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?


What does your spreadsheet data look like?

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

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?

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.

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.

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

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

image

Or just use if is empty do… else…:

image


IMG_20240310_103418

I tried the both … but still the problem

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

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.

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

1 Like