very simple. but I won’t working for some reason
There is two app.
One app is making Quiz(A), other solve Quiz.(B)
A upload question and answer to TinyDB. it there is already some Q&As, then loading it.
B only load Q&As from TinyDB.
this is my code for B.
for some reason, app inventor refuse to load data from TinyDB when B case. It keep return empty list, however there is 5 element each. It keep saying “Select list item: Attempt to get item number 1 of a list of length 0: []”
I don’t know why, however
In this case, for A, it working well.
Q1. Do I not supposed to using DB like that?
Q2. How to fix this weird error?
The only difference I can see in your two block images is the “UpdateQAs” procedure block at the bottom of the second one. What happens if you remove that ?
The GetValue calls are not for TinyDB, otherwise they would have value nipples.
They must be for an external database like TinyWebDB or FireBase.
So the return values are delayed until the appropriate .GotData event fires.
You would not find the results in the event where you would ask for the data, it’s too soon.
If you find the data during debugging, it’s leftover from a previous run.