Data Disappearing from Screen After 30-40 Seconds

Hello,
My application is working without any issues. However, there is a different situation. For example, I fill in the sections on the screen and perform calculations. But after about 30 to 40 seconds, all data on the screen is cleared. How can this be resolved?
Thank you for your support.


If you are viewing the project in the Thunkable Live app, it refreshes the whole app each time you make a change to the project in a browser. If that’s the cause, make sure you don’t click anything in your project when previewing it on a device.

I am not doing a live application test. I exported the application as an ‘.apk’ file and installed it on the phone this way.

This is exactly the problem im having as well. Mine too has been exported as an apk file. All textboxes clears on its own after a short while. How do we solve this issue? Please anyone

1 Like

Hello again.
Can anyone help on the subject? How can I solve this problem?

Post a link to your project so that other people can test it on their devices.

Since I am a free user, I cannot link the project.
For this reason I added the apk file.

You can still share project links as a free user. See this: Share Your App | Thunkable Docs.

I was able to find your project in the Public Gallery.

This problem is happening because of how you set up your if/else blocks, as I describe below. Also, comparing text strings to an empty string (“”) using inequalities (>) is probably not going to work. What is the point of that? If you are trying to make sure the strings are not empty, use ≠. But another problems is that you are joining text inputs with AND blocks. That doesn’t do what you think it does. It doesn’t mean “all of these text inputs.” It means “Is this text input TRUE and this text input TRUE…”

So this needs to be programmed a different way because you are causing the labels to be cleared.

The proper way to do this is: If [text input] ≠ “” AND [text input] ≠ “” AND …

But the problem with that method is that if not all text inputs are filled, that text input will be set to “”. So I think you need to rethink this screen.

Can you describe what it is you’re wanting to happen?

1 Like

Hello,
I added the necessary operations to run when the textbox data is changed. The reason I did it this way is because it was throwing a mathematical error when the cells were empty. That’s why I added the > "" condition. I’m not very experienced with this. I will try to adjust it as you suggested.

Project share link: Thunkable

Edit:

Is the second situation what I should do as you mentioned?

2

No.

To avoid the error, add zero to any input text’s value. That’s how you convert a string to a number. That way, it won’t complain when you leave a text input empty because it will still have a value of zero.

I did not place any button for executing the operations in the application. Instead, the calculations are linked to the textboxes present on the screen. Some of these operations use 2 textboxes, while others use 4. If any of these 2 or 4 textboxes are empty, the calculation does not execute.

I have set all calculations to trigger when the value of a textbox changes. This setup has been sufficient for my needs.

If I set the value of the textbox to 0, it will not appear visually empty on the screen. I want it to look visually empty but still function in the same way. Is there an alternative approach I can follow?

Here’s how I would do it:

1 Like

Hello again.
I have rearranged the entire file according to the example you provided. I will export it as an APK and test it. Hopefully, it’s resolved this time! :grin:
Thanks again.

https://x.thunkable.com/copy/35cc28d90975d4e98c974bb2bb9c955a

1 Like