How to sync tinydb data to google sheets?

Perfect. It worked really well.
I believed that the logic to delete something was to remove it from TinyDB according to the block below.
The way you set it up, it makes perfect sense.

blocks(6)
A very wrong use of these blocks.

Thanks again for your support.

1 Like

this is what i said it earlier… You are not saving the data in tag manner, under same tag only you are saving the data … so you should clear based on index only

1 Like

Sorry. I wasn’t understanding the difference between the tag and the index.
Now my way of building has started to clear up a bit.

Practical examples are a great way to learn something.
Thank you again. :clap: :clap: :clap: :clap: :clap:

1 Like

Hello. I tried to make a new change in the app. This time a simple formatting of the way the listview presents the list.
During data entry it was great, but when I used the long click the list returned to the normal presentation.
I created a procedure and applied it in the long click, but it didn’t work as desired.
What am I doing wrong?

blocks(7)

What is the block used for long click

The block is without the procedure, as the procedure only works correctly on data entry.

blocks(8)

See the tg name… it is totally different… why? In earlier post it says format and here it says saved… strange…

I tried to put the same as the TAG of the formatted list, but it didn’t work either.

If I change the TAG to “Format” the list changes correctly, but when sending the app it sends the whole list and not the changed list.

Captura de tela 2022-12-06 080456

pls see your blocks part, both the tag have different struture… if so how can you expect same resulkt to show??/

I understood the need to have a structure compatible with the result, but my question is how can I accomplish this?
I know it’s wrong because I’m not getting the intended result so I’m asking how should it be done?
Please, can you help me again to understand how this structure should be assembled?

you must use same variable in order to have constant work flow…

I am creating a list,
Seeing the saved value in listview
On long press it removes

So to do this you must use same variable, same tinydb tag… else you will have an headache

I understood.
But then what would be the correct way to edit this list just for viewing in the listview?
I create the list
I edit the list
I send the list with the same TAG
But the ListView presents another list on the screen.
How can I carry out this logic?
Please, help me.

you wanna see what is present in Service A or Service C?

Not.
I need to view only the last list item in list view.
But sending all the list items to Google Sheets.

I need to see in the list View only the entry SERVICES which is the last item of six.
But send all six items (TAG, NAME, DATE, KM
and SERVICES, ) for Google Sheets.

I manage to accomplish this when entering the data through the procedure I created, but when editing with Long Click the procedure clearly no longer works.

I cannot completely understand, a part only understand due to your logic…

You are creating a list with 6 items… ok…
Again 6 items you are adding to the list… ok
List view will show the saved items as every row … ok

On long click saved items are deleted … ok

On button click, existing values are saved in gsheet… ok

Still you are looking something after changing or disturbing this logic…

I’m creating a list with 6 items per entry… Working

The 6 items are adding to the list… Working

When showing in List View, only 1 of the saved items is viewed by the user … Working

With a long click, an entire entry of 6 items is deleted… Working

When clicking on the button, all remaining entries with their respective values ​​are saved in the gsheet… Working

Two buttons.
1 saved in TinyBD…Working

2 Send whatever is still saved… Working

The ListView shows all the last item of each entry… Working

The long click on the list view erases the entire entry and returns the list view without the deleted entry…Working BUT showing all the entry items and not just the last item.