Need help saving data with TinyDB

I have an app that uses button clicks to increase or decrease a total number displayed within a label. I am trying to work out how to use tinydb to store the total number of button clicks and continue to display it within the label, even if the user navigates away from that screen. I have included my current blocks below:

Since you keep counts by date, use the date 06/17/2023 as the tag and the count 0 as the value.

Do not bother keeping a variable for the count.

Use the TinyDB Get Value block for today's count, default 0 if not found.

Store the incremented or decremented value back under today's date immediately.

1 Like

Figured it out after awhile of playing around with different blocks. Thanks for your help :slightly_smiling_face:

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