How to make a counter that remembers the number

Hi - I am trying to make a counter that goes up 10 when you press a button and goes down 10 when you press a button. I have figured out how to do that i just dont know how to make it stay because when i go to a different page it changes to 0.

1 Like

Use TinyDB to store the value of count on each click and write a block / When Screen XYZ initialize// set Global count to > Get count value from TinyDB

//Ct tricks


what is TinyDB


Hi @Anna_Bushlack :wave:

The settings app tutorial give a guide how to use this component:

Are you using Thunkable X or Thunkable Classic?

1 Like

in this video in calls it TinyDB is this equivalent to the localDB, RealtimeDB, or Media DB

1 Like

Aha, then I suppose you are using Thunkable X @Anna_Bushlack. I’ve changed the category of this post to reflect this.

I’d recommend using a stored variable to remember your points score:

1 Like

It has been almost a year sence I started this project. I have desided to continue working on it now sence there is no school. I went through the variables link you gave me and it still does not work. Screenshot 2020-03-17 at 12.05.57 PM

1 Like

What am I doing wrong.

Hi @Anna_Bushlack :open_hands: :sun_with_face:

Thanks for posting this question, I think this is a great starting place for any programmer looking to learn the Thunkable X platform and to learn basic programming logic! (I am one of those new learners btw!)

I will make a tutorial and post on this!

Hi @Anna_Bushlack, I have just posted a tutorial for making a simple counter app


Thanks I will try that right now.

also, @Anna_Bushlack, in this I have another example of a counter app that has 10 counter but uses only 1 Cloud variable and 5 buttons.

you use a switch to change between which set of 5 counter you use.