How to make a list of stored data records

Hi everyone,

Can anyone help me? How do I make a list that fetches and then displays all the data entries of a certain data collection. The data collection is locally stored. I can’t find a way to connect the list item to the created data entries.

(Please tell me if I should explain in more detail)
Thank you

Hi @JP_van_der_Merwe

If your data entries are stored locally (in a client-side database) you should be able to set up a data variable using that source of information.

In the app where you have your list item, you should use the box “repeat with” and link that to the data variable you have just created. The Primary and Secondary box should reference (property of data item in repeat) where you select the item/information you want it show.

Hope this help you.

Dan

Wow! Thanks @Dan I’ll try that right away. Thank you for the help.

@Dan I managed to connect the data to the list, now I just have one more question.

This is what my list looks like now:
image

As seen on the right side’s text element, the text displays my number property that I assigned to the data source (animalrecords.number). The only problem is, it only displays the data for entries with an ID of 0. (notice how it searches of animalrecords[0] on every list item.

How do I make the list items search for records in order of ID number, such as animalrecords[0] then animalrecords[1] and then animalrecords[2] and so on?

I already created a system that assigns each new data entry with the previous entry’s ID +1, so if a user creates an entry its ID will be 0. Then the next entry’s ID will be 1, and so on. So that is already in place, now I just need to know how to make the list display them in order.

Can you help me?
Thanks

(Please let me know if I should explain anything in more detail)

Hi JP,

Without knowing how your local database it set up ie the use of properties, I think the [0] after records is causing this issue, as it will always give you only the [0] value. I don’t believe you need to specify a number when using repeat, I didn’t have to.

Have you checked debugger to see what is stored in your data recourse and how it is saved?
When you chose the primary and secondary label, did it give you an option of ‘current’ and then the option of choosing a schema property?