Data Viewer List + PHP + MySQL

First of all, I’m enjoying Thunkable X and the awsome community here!

Now… some weird stuff “of course” :laughing: maybe some Thunkable gods like @domhnallohanlon can help! :raised_hands: :pray: :pray:

The ideia: push notifications will be stored in a mysql database and replicated to local datasource , in the app, user can view, mark as read/unread and delete notifications… everything is fine here, the problems is not related to push itself or OneSignal.

I’m using a Web API component that calls PHP script to get/update the database.
A Data Source (local table) is used to store a “clone” of mysql rows. For this, at “sync process”, I delete all rows in my Data Source, and insert the new ones from list that came from Web API, as JSON… all using a stored variable as list to store the local row id’s.
A Data Viewer List to display notifications… and that’s where the are two problems:

1. When new notification is inserted in MySQL database with no notifications in local data source. Clicking the reload button… new row is created, as you can see the row id, on the top label. But, the Data Viewer List shows “no data found”. Then I close app, open it again, and the data is there.

2. When reopen app, the message is ok. Clicking the reload button… I delete the local data source rows and insert the new ones from API, but it’s like the displayed row was the deleted one, no contents is shown. Again, the new row was created as seen by the rowid on top label. After swiping down on list, message is ok again.

Hoping to be a bug! :laughing:

Thank in advance!! :facepunch:

Anybody could help please? :sob:

I can show blocks and stuff in private.

Tks

If I understand you correctly, there is a problem with displaying data in Data List Viewer, which becomes correct only after a swipe to update? If this is the case, I can say that the Data Source and Data Viewer components are currently unstable and have bugs. What to do? Either use ListViewer, or wait for developers to make these components work reliably.

Tks for your reply @actech

Yes, that’s one of the problems.

List viewer is too limited, I need columns or multiple lines for each record. If you have any suggestions about this, I appreciate.

Any predictions about these components updates by the developers?

You can create a table from several Listviewers located next to each other. If you find it difficult, then look in my project scrTableViewer

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

Any ListViewer with image

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

1 Like