Need help with split items from list and merge them in another list

i didn't change anything in your blocks.
In all my tests it sorts list the right way, by vehicle (list1, index1) and then by date (list2, index1).

@TIMAI2 how can i find list index from table?

in the block:

image

"row" should return a number that relates to the index, it may be 1 out due to the header row.


What i made wrong?

Hmmmm

possibly removing items from a list in memory (the reversed list) will not work ?

Try setting the reverse list of global logs to a variable first. Then when the item has been removed from that variable list, reverse that list again back to global logs before saving to tinydb.

image

1 Like

I have just looked again, you are trying to set an index with an item

image

1 Like

@TIMAI2 you're right.
This fix it.

I have another problem. I created 6 "tabs" (buttons) with vertical arrangements in each one.
Vertical arrangements opens and close from button_tabs.


Button_tab_1 and button_tab_3 (add new record and add vehicle), works fine
If you click button_tab_2 (record tables), new vertical arrangement opens and it have 3 more button tabs (button_tab2_1, button_tab2_2 and button_tab2_3(per date, reminder, fuel)).

Button tab 1 (add new record) calls spinner 1, button_tab2_1 (per date) calls spinner 2, button_tab2_2 (per reminder) calls spinner 3 and button_tab2_3 (fuel) calls spinner 4 to select vehicle by licence plate.

Result is table1 in every tab button_tab2_1, 2_2 and 2_3 with different lists.

It works fine. When i'm in button_tab2_1 per example and press button_tab_2 ((record tables)(for display again the 3 "sub tabs")) i can switch between "sub tabs" ((when i click button_tab_2 (record tables) it close table and opens vertical arrangement of "sub tabs")). After 2 or 3 switches i receive runtime error select list item:Attempt to get item number 0, of the list .... (vehicles)

Blocks of tabs are:

How can i eliminate error?

My guess is that at some point a list selection block is expecting a list to select from and not getting one. You will have to debug to find out which one and where!

You may need to simplify things, test, then add a bit more, then test again. It looks complicated :slight_smile:

1 Like

I solve last error (select list item:Attempt to get item number 0, of the list .... ).
When a table is up, i close all the remaining vertical arrangements and I put a button close table.
If you click it, it refresh the page (close page and open same page).
Error gone. :smiley:

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