Tiny DB issue pls help

Hi Koders!
I’m new to kodular i have developed offline quiz app from free aia file available online which having 5 questions for every correct answer 5 marks should increase in Marks_Label
i want to show High Score in Screen3, when next button clicked in Screen2 (after all 5 questions asked to user)

In Screen 2:
so i initialized global High_Score Variable when Next Button clicked if Marks_Label is greater than high score. then set High_Score variable to Marks_Label Text and call Tiny_DB1 to store global High_Score variable otherwise set Global High_Score value to call previously stored value from Tiny_Db1

In Screen 3:
set High_Score_Changing_Label to call TinyDB1 value…

Problem is when i go from Screen 3 to Screen 2 its working perfectly fine…
when i go from Screen 3 to Home to Screen 2 and answered all questions wrongly then also works perfectly but answered 1 or more question rightly then Tiny_DB1 data cleared automatically and High Score showed in Screen3 is Marks_Label Value not previously stored Tiny_DB1 Value.
I have attached relevant screenshot for ur reference…pls help me to solve this issue…

as i’m new i made this blocks based on my knowledge plz help me…

remove the TinyDB.ClearTag method, you don’t need it, because you can overwrite a value…
Taifun

@taifun Sir after removing TinyDB.ClearTag also same error arising plz help me to solve this issue…

where do you clear TinyDB, you might want to remove that…

see also how to switch screens correctly: App Inventor Tutorials and Examples: Manager Screen | Pura Vida Apps
to pass values from screen to screen alternatively you also can use TinyDB, see also How to pass values from one screen to another screen by Scott

Taifun

@Taifun Sir,
when i clicked your link to How to pass values from one screen to another screen it shows the following error “This group either doesn’t exist, or you don’t have permission to access it. If you’re sure this group exists, contact the Owner of the group and ask them to give you access.”

So plz give me alternative link sir…

see the book, especially the chapter which talks about TinyDB…
Taifun


A very good way to learn App Inventor is to read the free Inventor’s Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps … the links are at the bottom of the Web page. The book ‘teaches’ users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .

Also do the tutorials Tutorials for MIT App Inventor to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

2 Likes

@taifun thanks sir this book u have given is awesome it solved the issue in my app…
and also this book contains more informations on various concepts as a beginner it really helps me to understand concepts better…
Thanks sir once again for sharing this book to me :+1:

2 Likes

And since you are making a quiz app this could also be helpful.

3 Likes

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