Persistent Data in the ListViewer

Here’s a quick example of how to save data in a list viewer and make it persistent i.e. the data is saved in your app and displayed the next time you open it.

Create a stored Variable

Start by creating a stored variable in your app. In the example below I’ve called my variable listOfItems.

Note: when this variable is created it has no value, so you need to assign it one when your app loads for the first time.

Create an empty list instead.

In the image above we had some started values, or placeholder values we wanted to use, but if you want to start with a blank screen then use the blocks below instead:

Update your list

If the user has typed something in then we add it to the list with the following blocks:

2 Likes

This tutorial can be used when you are trying to make a notes app. :smile:

If you are looking for a working-demo app, please refer to “notes & todo(s)” screen in below app -

https://x.thunkable.com/projects/5d63c7440b0682b0fed6ed6e/209aa573-9657-49fd-8c77-f1803a9f015b/designer

(This app was my winning entry for August Hackathon :star_struck: )


Nice Tutorial @domhnallohanlon! :+1: :+1:

Thanks! :blush:

Edit - I have used local storage instead of stored variables

1 Like