Sharing a tinydb between apps

So, what I am trying right now is the cloudDB until i set up something else where. What's happening is that the commands execute so quickly that the data has not 'arrived' before the formatting commands are completed and so get an error reporting that there is no data.
Is there a way to suspend execution for even one second to give time for retrieval?

:question:

Show your relevant blocks

TinyDB is the only native AI2 database with instant gratification.

All others need to add event blocks to handle incoming data requested elsewhere in your app.

If i hit the load button twice, the data is present on the second click. I am going through to follow the logic again. It is a mess right now as I am converting from a local db to cloud db, so the blocks are very messy. Once I've cleaned them up and if it's still in delay mode, I will post some blocks, but right now, npot even would know what to post...

Like I said to Tim, I am going through and tidying up the blocks as yes, there are several hoops to code through with remote DBs

I forgot to mention a design factor with remote access.

You might need to add global lists to hold data that's waiting its turn to be sent on its way to the server, like in an airport or bank.

You will also need to leave yourself notes in global variables along the lines of What Was I Doing to help the Got Data events decide What Do I Do With This Incoming Datum?



Airport taxi line, hmm. Good point...

Here are the blocks as they sit now, at least the blocks for retrieving data.
What happens is I click on the listpicker selection, it goes to get the data, but as it executes the display_current_record (which actual now ONLY displays the data) it does not update. It will show whatever last record was displayed. If I click again on the listpicker, it will then display the selected record., notably, if I select a different record, it will display the previously selected record.
What I am thinking is that I have to pre-load all the records at initiation into a local, global array, right?
edit* I just moved the *[get_and_display_current_record] rocedure to the end of the .GotValue block, it works there... is it just a delay in retrieval? or is the execution order that sensitive?

Depends on the data volume. Could get slow and expensive.

Maybe divide the data by day?

They are just very small data packets holding about 25 pieces of data, name, address, payment prefs etc, and so far only aboit a dozen records, so very small amount of data

Move that procedure call getanddisplaycurrentrecord to the appropriate branch of the got data event, and rename it without the get, since the data is gotten.

(off to breakfast)

Done. Cheers

(off to work) Thanks for all the help folks. I know they are silly little problems, but the spanish flu was also just a silly little bug....