Error with delete button

Hi,

I have a delete button which delete records in listviews but an error appear when the user don't select a listview before, otherwise no problem when a listview selected.

The message is Remove list item: Attempt to remove item 0 of the list [

How to add notifier when no list selected? I test an if/else get item = 0 for my delete buton block but nothing.

Thanks for your review.

How user select listview before ? Can you show how you create those list views?

To select the list, just press one of the four existing lists.

Capture d’écran 2021-06-06 102903

Try my approach and modify blocks according to your needs

ListViewDelete.aia (5.7 KB)

Thanks, I see that.

In your project, I don't understand how it can help me.

I only see block to initilialize a clock which close the screen.

Go to screen2 :slight_smile:

Sorry i hadn't seen the second screen

Thank you, I was able to get what I needed.

1 Like

Glad I could help

Now I have a problem with the delete process. When the user choose the line to delete, it disapear but if he go to an other screen and back to the screen where the record was deleted, the record come back.

Save lists to tinydb and when screen initialize get value from tinydb , if tinydb's value is empty then load original list

ListViewDelete1.aia (6.7 KB)

I have already this

If you wish post or pm your aia to check it

Thanks.

I found and fix my error. I forgot to modify one tag label.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.