Item click list view con local storage

hello, maybe you can help me if it’s not too much trouble in a code that I’m testing but it doesn’t work out, I managed to save the data in local storage, but of course I want the data to be displayed in a text input through a list view and which clicking on the list view shows me the data for each of the text entries.
I do it this way but all the names are shown together in the text input just like the surnames. I want that when I click on one of the name items, the data of that name is shown separately.
If someone can help me I thank you

regards

here I leave the code:

1 Like

You should not be using Local Storage. You should use a local db.

More info: Local Storage - Thunkable Docs

1 Like

Hello, thanks for your answer and how would I go about saving the name and surnames and then clicking on the item and seeing the data in each text entry, that is, showing the name and surnames of a certain user, not showing everything in one text input.

Thank you

1 Like

The same way. But you’d use the Get Value block from the Data Sources drawer and set the row id to the green index block.

Sorry but I don’t understand, could you pass an example of how to save and obtain data in local db.

There’s an example here:

1 Like

Thank you very much for your contribution, one last thing, I don’t know how the local db works, but how do I create the Name and surname columns and save the data using a button.

1 Like

You can Google local db Thunkable to see documentation and videos that will help explain how to do that.

I’ve been looking but I don’t see anything concrete would you have an example

1 Like

From the main design screen use the + sign
image

You will see a list of available Data Source connections. Click the Create New button.
image

You will get to choose the Data Source Type, select Create your own table.
image

Type a name for your table and click Create.
image
You should be seeing something like this
image

Click on the column name like Column 1 x and change it to the name you want. Do the same thing for the other column. You can click on + New Column to add more columns. Like this.
image

Hope this will help you to setup the Local Table for your app

Thanks for the help, I got there but the code to save data in that table through code, that is, when putting name and surnames, for example, they are saved in the table, not put it directly in the table. I don’t know how the block would be

1 Like

To save new data in the Local Table use this block.

image

sorry but where is the create row block in the table because I don’t see it in thunkable when clicking on local db it comes out this way there is no such option

1 Like

You are looking at the wrong blocks.

First create the table using the + as I explained in the last post.
Start from here
image

Once you create the table you can then access it from this option.

See this demo project
https://x.thunkable.com/projectPage/5fb9fb1dbfeb240011084d78

Thank you very much for your help, it was very useful and I managed to see where it was, greetings.

I try to save the data through the block but it does not save the data.

How do you know it doesn’t save the data?

because they are supposed to be stored in the data sources of the created table.

Apparently I was able to investigate that they are saved but they are not shown in the table

1 Like

To show saved values, you need to view it in the app either by looping throw records or by using DVL (Data Viewer List). You will not see any data changes when you the table in the design page.

1 Like