If you have been thunking for a while, you may have learned a few things:
- Data List Viewers and Data Grid Viewers are easy to design and execute quickly on devices
- Data List Viewer and Data Grid Viewer components cannot be bound to JSON
- All sorts of Web APIs and Firebase RealtimeDB (aka cloud variables) use JSON
- Airtable and Google Sheet data sources are generally slower and less reliable than Firebase/Cloud Variables
- Creating or cloning components for JSON lists are progressively slower and are largely unuseable after 20-40 components
I wanted the best of both worlds:
- Speed and reliability of JSON
- Speed and reliability of Data List Viewers
And behold, a Christmas miracle: the JSON Bound Data List Viewer!
The Blocks
The Discussion
When creating the Data List Viewer (or Grid) click the Add button and scroll past the existing data sources a click the Add New button. From the available options, select “Create Your Own Table.” This will create a local DB that is not connected to anything external source (Airtable or Google Sheets).
The magic happens in the fill button. I set the APP variable LocalJSONHolder to a JSON list. Then for each object in the list, create a new row in the data list viewer local data source (JSONConverter). Adding the waiting blocks is critical, otherwise you can get unpredicable results. That’s it!
In this demonstration, I created a simple JSON object list. This could be substituted for any RealtimeDB, cloud variable, or JSON WebAPI response.
The Display
You can use the same technique for both the data list and data grid viewers (list on left, grid on right)
The Project
https://x.thunkable.com/copy/8be008e87a0e0ed5984b9d1e417b4200