Datalist with conditions

I’ve tried your solution, but there’s something wrong.
Is it possible to use it with Live Test?
I’ve placed a simple button to create a row, But no row is created and no way to debug the error.
local_table
What’s wrong?

Hi @Giuseppe_Geppo_Catta (and @gobassky?),

the data viewer list/grid does not automatic refresh. I also stumbled over it, they refresh when
a) the user swipes down the data viewer
b) a new screen opens.

I prefer solution b).

How does it work? You have to place the data viewer on a different screen!

  • Define a data source (a local data base like your “eventi_loc”)
  • Add data (like your block) as much as you like, in let’s say “screen1”
  • go to screen2, where the data viewer lives.

Right now there is a bug (I discussed it with @Steven): the block “create row in…” works and it creates new rows, but the returned “rowID” is undefined. Therefore it is not possible to change the entries, we must wait until this issue is fixed. But when it is done you can do whatever you like with the local data base in screen1: filtering, sorting etc. and then switch to the screen2 with the data viewer.

And yes, it works with Live Test.

The problem is that I’m not displaying any data in any dataviewer at the moment
I’m only looking at the table clicking on data source in “Design” tab of thunkable.
I expect to see data there

It seems to me there are too many bugs in local table datasource!
At the moment If i get to “Design” tab and click to my local table in Data sources, it shows a pop-up window with an empty table.
But if I try to display data from that table to a list viewer, there are many records (as many as the times I’ve tried to write records) but I don’t know how to clear table or to show data out of the app.

UPDATE: I found a way to delete row one by one clicking on single item, but how to do to clear the entire table?
Being the “delete row” based on rowID there’s no way to get rowid without a user interaction. Am I right?

This is how you delete all entries in a local data db (thanks to “actech”):

Please read my last post: right now there is a bug, when creating new entries. This is the only bug I see. The local datasource is a really good way to have individual data in your data viewer list/grid.

What happens to you when you do the following steps:

  • delete all entries in local db
  • add new entries in local db
  • goto other screen, where the data viewer list lives?

Have you configured the data viewer list correctly?

Opening the table in design mode may show some rubbish, this is a way to proof if all columns are defined, not more.

Opening the table in design mode may show some rubbish, this is a way to proof if all columns are defined, not more.

Ok, so i don’t have to expect to see my data there, and there are no way to see data out of the app, right?

So delete ROW has a ROWID parameter but it’s not a ROWID but a ROW number.
I think this is misleading…

However, it seems to work this way :wink:

1 Like

Yes. You don’t see your data there. For debugging purposes you have to look at the data with your data viewer list/grid :slight_smile:

Filter without queries on the scrLocalDBFilteredRecords screen in the project.

The trick is to choose the right components for this. To do this, you need to understand that there are components for displaying data, and there are components for performing operations on them. And this is not the same thing.

https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/