How do I Store Favorit's Buttons for Later Use - Re-Opening the App?

Dear Community,
I've been sitting on this problem for many hours. I have a medicinal herbs app that should have a favorites function. I have created a ListPicker in which all the plants and diseases are included. The selection from the ListPicker also works. Unfortunately, due to my lack of experience, I am not able to display the button that represents the favorite after closing and reopening the app. It is important that the user keeps his favorites. Can this be realized at all with a button? I work with visible and invisible buttons. You should also be able to delete your favorites. Then I set the button to invisible. Switching the buttons on and off seems to work. Could someone please help me. I have attached a screenshot. Also, I would like to know how to select different elements/blocks, CTRL doesn't work unfortunately. Also I can not draw a frame. Thank you very much!
Best regards

This is called multi-select.

You will need to use TinyDb to save lists between runs of your app.

Here are two samples:

If you have not yet learned how to use lists, see the introductory section of

Thank you very much. I will try it. Have a great day!

Unfortunately, with this code the TinyDB data storage problem is not solves. I had a closer look at the multi select in AI2, but there was nothing with the TinyDB. I did not see something with the TinyDB. I only need to know how to store and how to get the values for the TinyDB, so that the plants and desease buttons are still visible after closing re-opening the app. It is a lack of knowledge in TinyDB storage. I tried many ways, but everything failed, because I am working with visible and invisible buttons. Could some please help a second time? Thank you very much. Have a great day and stay safe!

Further hints ...

Your buttons that you want to remember have different .Text values, right?

Those would make good TinyDB tags, with values of true or false to denote favorite or not.

You should keep a global list of all your button components, to allow you to use the generic Any Button blocks. Likewise for Arrangements that you might want to tie to buttons through a lookup table.
That would let you avoid proliferation of button events

Here's some sample TinyDB articles ...

Also, here is a collection of books and tutorials ...

Thank you very much. Tomorrow morning I will have a look at it. I created this evening store value and get value blocks, but there were always error alerts that it is the wrong number for eg. I have no experience with TinyDB. It seems to be complicated. There are about 100 deseases in the app. Now we have 10:20 pm. I am writing from my tablet. Thanks.

Thank you. Here are still two screenshots. I have two lists with the tags. I will try the Any buttons. Thank you.

With this method, you can not retrieve the component back, if you close and reopen the app, since this will only store a string (id), when reopen the app, this will change.

Thank you very much, I found another solution, that I will not provide favs in the app and I made other functionalities, which are also useful like saving as TXT file and share in social media or printer. Thanks! Have a great day!

From your block images, I see you following a road to a dead end.

If you keep all your data in blocks, you limit the size of the app to what the Blocks Editor can handle.

Your Blocks Editor will get slower and slower, until it can't handle any more blocks, and your Build process will hit its time limit wall.

Better to load your data from a file in the Screen Initialize step.

Thank you ABG!

Hello, it is still about saving the favorites. I had looked at Multicheck, but I couldn't figure it out and I couldn't apply it to my case. There are already apps in which favorites are useful and sometimes indispensable. It should work similar to a shopping list, only that a tutorial on a shopping list did not help me either. Could someone please show me how to do this with a ListView? Thanks a lot!

I am worried about a repeated pattern I see in your posts.

You talk about the visual components (ListViews, Buttons, etc.) of your app as if they are primary repositories of data.

They aren't.

They are like projections, footprints, or shadows of the true data, which must reside in data bases of various types, in multiple tables containing the entities your app covers.

I recommend doing a web search for 'Introduction to Data Modelling' to gain an understanding of the common ways of thinking about data and data tables.

Here is an overview article by IBM (remember them?)

Your web search might find shorter, easier articles.


Here is the code, also with a delete fav button:

You are missing a master list of the things you want to choose from when picking favorites.

P.S. Do you have a question?

P.S. in your add to fav button, the test is incorrect.
Use IS IN LIST instead of text CONTAINS.

For example if the list is (import, export)
the test CONTAINS(list,'port') would come up true, which you would not want.

Dear ABG,
Thank you very much, I will try it.

Dear ABG,
Yeah! It seems to work. I also will change it in my other apps where I have already favs. Thank you so much. Here is a screenshot of what I have created with your help. Have a great day!

This can't be right.

First, you test (is FAV in favList), implying that favList is the list you are maintaining, and fav is a single favorite you want to add to favlist uniquely.

But then you add to the wrong variable, FAV, instead of to the list FavList you just tested.
And you add something else, instead of FAV.

Then you save the individual favorite to TinyDB.

Where do you save the list of favorites?