Hi Koders,
I’m working on a delivery planner app using Kodular + TinyDB + DynamicComponents. The app allows the user to add delivery destinations (address, contact, etc.) to a selected list, and then view them on another screen.
What I’m Doing:
- Screen 1 (AddDestination): Saves destination as a dictionary inside a list using
TinyDB.StoreValue
- Screen 2 (DestinationList): Reads the list using
TinyDB.GetValue
and creates dynamic cards with destination details
The Problem:
Even after saving a destination:
- It doesn’t appear in the
DestinationList
screen - Or it sometimes fails to save entirely
- I suspect
GetValue
might not be working as expected, or it’s not waiting to return the data
What I Tried:
- Checked tag names (same across screens)
- Initialized
global allDestinations
to result ofGetValue
- Tried using default empty list fallback
- Used
DynamicComponents
to build cards
I’ve attached both screen block screenshots:
AddDestination
(Save logic)DestinationList
(Load and Display logic)
My Questions:
- Is
TinyDB.GetValue
asynchronous? If yes, what is the right way to handle this withoutGotValue
block? - How do I ensure data is properly loaded before starting the dynamic components loop?
- Am I missing any better practice for cross-screen TinyDB usage?
Thank you in advance!
Ahmed