Problems with text inputs and numbers

Hello guys, im new with thunkable and i need to do a school project using thunkable, its a loan payment app, there is a screen that asks you how much you receive in a month and the value of money that you want, if the value of the money that you want be higher than the value that you get in a month you will get declined, otherwise, it will be accepted, you will get the result in the last screen. But, in my blocks, i create a custom variable, if the value that you want be acceptable, the variable value will be changed by 1, otherwise, it will be changed by 0. But in the next screen it just keep being accepted only, what i do?


You are comparing a text input to a text input multiplied by 3. You need to compare numbers to numbers. The way you convert a text input to a number is by multiplying by 1 or adding zero (either will work). Then your > condition should work.

Keep in mind that change app variable $ by 0 does nothing. If you have a variable and you change its value by zero, it has the same value. Changing the value by 1 will add one to the current value. You may want to use the set app variable $ block instead or you may want to use a boolean variable that can be true or false.

Thank you but i dont know how to do that, can you do a example and show me the a print?

I gave several different options… are you wanting to use a boolean? What should happen when Valor a receber is greater than Renda mensal? And when it’s not greater?

When “valor a receber” is greater than “renda mensal” x 3, you will be declined, if not, you will be accepted, also, if i put letters in the text inputs, it will show “accepted” without any error, i just want make the “valor a recebed” and “renda mensal” be int only, and fix my codes


i did this and my code still not working, dont matter what i put in the text label, it only gives me the “approved” screen

You need to do some debugging at this point. For example, when the screen opens, is the app variable $ 0 when you expect it to be 0 and 1 when you expect it to be 1? If so, then the problem is not in the Screen Opens blocks. If it is not what you expect, then you can troubleshoot those blocks further.

By the way, you don’t need to set the app variable $ to 0 in that set of blocks because it’s either going to be 0 or 1 when the if block completes.

i did everything and it only gives me the same approved result, i will send you my project link if you can see the codes and other things if the problem is not the codes Thunkable
Important update: i have tested a way to show if the value is 0 (approved) or 1 (declined), and no matter what i put, it just stay at the 0 value

I found the problem, i put the value condition before i click the “submit” button, that is the problem, also, everything that you say helped me to prevent another bugs, thanks its solved

1 Like

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