[SOLVED] Procedure displays data when fired by a Button, not when called by ScreenInit

The AirTables data is gathered and put into an SQLite DB during a Spreadsheet .Got Column. After the .Got Column has finished, the Screen Init fires off the procedure “showDB”, but the only data displayed is the “0” for number of table rows. Then, when “Show DB” button is pressed, the data from the DB is found and displayed and the number of table rows is “14”, which is correct.

Why won’t the procedure “showDB” find the data without pressing the “Show DB” button? Here are the blocks:

Waiting a second or three after Spreadsheet1 has finished makes no difference.

The data is available immediately during the Spreadsheet1 .Got Column with an SQLite Select statement (left out for brevity).

I tried this with Kodular’s SQLite and it made no difference, got the same “results”.

Any help would be greatly appreciated.

You can try using Clock -
blocks (11)blocks (12)

1 Like

Asynchronous. Try to simulate a click on your button and make it invisible.

1 Like

Beautiful. Simple, but elegant solution, thank-you! :joy:

I knew there had to be a way to trigger that data outside the .Got Column; been banging my head against my desk for weeks! :face_with_head_bandage:

Thank-you, thank-you, thank-you. :heart_eyes:

1 Like

I suggested because everything indicates asynchrony, everything is running without having to wait for the other task to finish.
I really don’t know if it’s the best solution.

1 Like

Seems to work only out of the .Got Column, but hey, it does work. I like Addylin’s Clock solution best. :sunglasses: Better to have two possible solutions than zero solutions.

Thanks for your help, I appreciate it.

1 Like

this would be the correct asynchronous solution…

  • no need for a delay…
  • no need for a clock…
  • display the result after it has been downloaded from the Airtable
  • also make sure to enable Button1 only after the data has been downloaded…

Taifun

I considered myself as bad koder after doing this but now I know it’s best solution thank you

1 Like

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