Point counter addition and reset


I’m new to bubble and I’m trying to build a point counter.

there is a list of usernames and they can get points. I’ve implemented a plus button to increase the points by 1. But I need a button to reset the points to 0.
Simply subtracting gets it into negative numbers, which I don’t want.

I hope someone can guide me.

Hi there, @salman-kh… if you have already implemented a button that increases a user’s points by 1, I wouldn’t think it would be a challenge for you to create a button that resets the points. It sounds like you just need a button that runs a workflow that sets the field where a user’s points are stored to 0. Is that what you are trying to do? If it is, what problem are you having?


Hi, yes, I was able to get it right.
I’m now trying to set a confirm pop/solution and a revert button.

Hi, can you please guide me.

I’m looking for a solution for this:

if same username gets entered multiple times, the count for the user should increase

I have no idea what you need here. You said you were able to get it right? Get what right? I also have no idea what “if same username gets entered multiple times” means. Gets entered where? By whom? And what is the count counting?

If you can share some screenshots or describe your use case/user flow from end to end, I’m sure someone will be able to point you in the right direction.

the count is counting the entries of the usernames.

if the usernames gets entered 7 times, the counter should show 7, but the username shouldn’t apear 7 times on the list

Sorry, I’m still not getting it. Are you saying if someone enters a username in the input at the top that is the same as a username that already exists, a counter for that username should increase by 1 when the button at the top is clicked? Also, what does the data type look like for usernames?

yes, exactly how you described it. Data type is string

So the username is a text field on the User data type? Do you also have a count (number) field on that data type, too?

yes, and I have a count field

I still don’t necessarily understand what you are doing, but if I just take it literally, then here is a way to see if an existing user has the same username as the one that has been entered, and if a match is found, increase that user’s count field by 1.