Please help me with making a counter

I would like to make a button that’s a down counter whenever the user clicks E.G: the text starts at number 16 and whenever the user presses the number goes down until 0. Please help me with making that function.

Well it’s quite easy.

  • Add a numeric field to the users collection. Call it COUNTER
  • Create a button that will make the counter decrease by 1
  • Assign to the button an action, that updates the LOGGED IN USER - COUNTER by 1.
    You can obtain last point, by making the counter equal to LOGGED IN USER COUNTER (add from magic text) - 1.

Hope this is clear! :slight_smile:

TBH, I can’t understand can you please give me an example of how to do that? I made a new click actionE6F7D2E7-4363-4af5-A016-3A64D68CED53
and sorry I am just newbie at this.

No problem. This is the setup you need to obtain. In my example, PRICE is the COUNTER


Well, it was increasing but I want the number to start at a certain number then decrease until zero that’s the hurdle at least for now I still can’t make the number at decrease

Then instead of +1, just make -1! :slight_smile:
And the starting number, you can define it automatically when the user signsup

Well, tbh I want no users etc… I just want the number start at a certain number E.G: 15 and by clicking it decreases and from what I see the database keeps it so whenever a person presses on the button it accumulates etc… with no resetting except that I must delete the database that’s why I want no database tbh.

Try countdown component.

Or, you could make your own component.

Where’s that countdown component please? Can you please give me a tutorial or something?

Countdown component is in the marketplace, once you click “+” to add new component you would see “Market Place” below, click on that scroll down until countdown appears, then downloads it, then use “Downloaded” and put it in your screen! There is 2 types of countdown component so which one you choose is up to you!

Unfortunately it doesn’t look like what I want it’s about timer etc… I just want a button that does countdown the more the you press from a certain number and without it being saved in the database because I found out that the number is saved in the database.

Explain more, so you want countdown that happens every time user clicks what does it do?

It doesn’t need to do anything just the more the user clicks the lower the number until 0 E.G: It starts with 15 and the user clicks it becomes 14 etc… until 0 tbh I haven’t figured anyway to do it and there are multiple problems that are facing me First: I haven’t found a way to put a number to start from. Second: I found that the database keep the numbers I just want the number to be kept as long as he’s in the same screen not all the time or for all users. Third the countdown I have the normal counter and I can do it np but I want a down counter

So you could make it if Logged In user clicked it updates number Current click -1

Well, something like that but the database keeps it etc… I want it to be on the screen only then if he refreshes it or something it resets and I can’t find a way to make a base number until now

Here how it goes, It doesn’t save if you update it, What to do is make a button and make number is Current Number-1 and when user re-enters the website/app make a loading screen a home screen and say Add 5 points if Logged in user current number is less than 5.

Well, tbh I really don’t understand and I want to make like 5 counters or something in just 1 page without users logging in or registering etc… so it would be best if it’s not complicated and without database at all.

I really don’t see a simple way on making this, this is only way I have! If you don’t understand I can make a cloneable app for you to learn from, but I am welcome to hear others for work way for it

Please make a cloneable app so that I can learn this

I finished the cloneable app!

Learning is the key, enjoy!

Cloneable [BY B0] (