How to store data

Hello, I just started using AppGyver as a hobby but am already a bit stuck with it.

I want to have a list item that lists categories of animals, such as mammals, reptiles etc. I’ve been through the data tutorial that is available and I think I understand how to set up data variable and connect it with the list item - the trouble is that the tutorial goes through how to allow the user to enter new entries (employees) rather than simply list them from an existing source. My problem is I just want to make a simple database of sorts that contains the animal categories and associated properties (e.g. number of animals that belong to the category). Intuitively, I would have thought that there’d be a screen where I can enter data that is constrained to the properties that I define in the data variable - the properties would be the column headers if you like, and the rows would be the categories and associated information. Is there somewhere I can do this? I’ve seen on the data tutorial that there’s a way to drag a database of information on countries from an external source, but I would have thought this could be done within the app and stored locally.

1 Like

Hi Dan, one way to set a static list of data is by using an app variable with initial values. I answered a similar question here:

Another way is to create a client-side data resource and populate it with Create record on the Global Canvas. However, an app variable might be the better solution since there is probably no need to save the whole database on the user’s device.

Hi Mari, thanks for your post. I now understand how to create the lists but I will need some of the values to remain the same if they are updated, even after the app is closed and reopened - is it possible to do this?

Thanks again.

Hi, yes you can do that with a data resource. :slight_smile: Check out this tutorial for how to update records.

Hi, those are good solution for a very limited number of records; what in case your initial data are 300-400 records ? is there another better approach ? thanks in advance, Marco

Hi Marco, in that case I would maybe look into a backend solution that allows you to import data from a file. I’m not an expert in the area so there might be better alternatives out there, but looks like Airtable that is popular here in the forums at least supports importing Excel files. There are also services like Sheety that you can use to turn a sheet directly into an API.

Hi Mari, I will definitevely pursue that option, many thanks for the advise. Kind regard, Marco