# Vote ONLY ONCE Button with Counter (Please Help!)

**URL:** <https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [December 27, 2020, 10:03pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823 "2020-12-27T22:03:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![delee\_thedeveloper](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@delee\_thedeveloper](https://community.thunkable.com/u/delee_thedeveloper)\
**Post date:** [December 27, 2020, 10:03pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/1 "2020-12-27T22:03:53Z")

</div>

I’m trying to create a voting button  
I would like the user to press the bomb button and the text show the number of time its been pressed but I want the user to only be able to vote **once** maybe if the IP address matches you say thank you for voting or you already voted is this possible? or how do I get it to where they can only vote one time? Please look at the picture below

 ![Screen Shot 2020-12-27 at 3.51.27 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/6/e64b34193bc30cac2297d8b8536b0f50c0550c45.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 27, 2020, 10:12pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/2 "2020-12-27T22:12:41Z")

</div>

I can show you an example

I saved a Database of objects like this

{  
someText:”bla bla bla”,  
Creator: firebaseUserId,  
likedBy: [user2’sUserID, user5’sUserId]  
}

When A user clicks like, The app checks to see if their userID is in the array of likedBy for that user. If not, it’s added

Then the number of Id’s in that array is used as the number of likes.

---

<div class="post-metadata">

**Author:** ![delee\_thedeveloper](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@delee\_thedeveloper](https://community.thunkable.com/u/delee_thedeveloper)\
**Post date:** [December 27, 2020, 10:15pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/3 "2020-12-27T22:15:19Z")

</div>

do the user have to save their userID or is it automatically generated?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 27, 2020, 10:25pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/4 "2020-12-27T22:25:43Z")

</div>

This is generated on login to Firebase and is returned by the login blocks

Alternatively you could use the user email, username, or any other unique identifier.

---

<div class="post-metadata">

**Author:** ![delee\_techdeveloper](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/delee_techdeveloper/32/29616_2.png) [@delee\_techdeveloper](https://community.thunkable.com/u/delee_techdeveloper)\
**Post date:** [March 17, 2021, 11:17pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/5 "2021-03-17T23:17:39Z")

</div>

Could I create a unique identifer so voters dont have to log in? I could really use your help.

Also can you share with me the app you created this in?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [March 18, 2021, 1:23am UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/6 "2021-03-18T01:23:36Z")

</div>

Nope. You need a login system of some kind. That is how you will create a uniqueID. The IP is not reliable as a form of unique identifier.

You need to use something like Firebase (or backendless) for authentication.

[https://x.thunkable.com/projectPage/5f74afe93ddbe4fba633cd87](https://x.thunkable.com/projectPage/5f74afe93ddbe4fba633cd87)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:19pm UTC](https://community.thunkable.com/t/vote-only-once-button-with-counter-please-help/1041823/7 "2024-11-08T12:19:24Z")

</div>


