# How to add counter as a Property in a Database Collection

**URL:** <https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696>\
**Category:** Resources & Tutorials\
**Created:** [October 7, 2020, 10:12pm UTC](https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696 "2020-10-07T22:12:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simba](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Simba](https://forum.adalo.com/u/Simba)\
**Post date:** [October 7, 2020, 10:12pm UTC](https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696/1 "2020-10-07T22:12:20Z")

</div>

The app has a database with two collections:

1. Users (email, password)
2. Topics (image, category, statement, number true, number false)

The app has the following pages:

1. Signup page, which feeds the Users database
2. Login page
3. Topics page: a list of statements + True Button and False Button for each statement
4. Create New Topic page: a form, which feeds the Topics database

I struggle with the following:

1. How to make the list of statements on Page 3 collect a True/False value (from users, other than the one who created the topic) to feed into the Topics database.
2. How to count the number of unique users, who selected the True value for any given statement.
3. How to display right next to each statement, the number of unique users, who selected the True value for that statement.

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![parasocks](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/parasocks/32/3055_2.png) [@parasocks](https://forum.adalo.com/u/parasocks)\
**Post date:** [October 8, 2020, 3:04am UTC](https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696/2 "2020-10-08T03:04:16Z")

</div>

Preface, I just started using Adalo a week ago and I have no idea what I’m talking about, but I’d like to _try_ to help.

1. I’d make these two separate screens, one for users who want to create a topic, and the other for collecting values on those topics from other users.

2. This sounds like a simple count of record entries where true/false equals true. I’m not sure if there’s an “is unique” type of filter for that, but you could add some validation on the forms on input to check whether they’ve submitted it before and deny a re-entry

3. Same answer as 2?

4.

---

<div class="post-metadata">

**Author:** ![Simba](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Simba](https://forum.adalo.com/u/Simba)\
**Post date:** [October 8, 2020, 9:16am UTC](https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696/3 "2020-10-08T09:16:55Z")

</div>

I already figured out a way to do 1 and (sorta) 2 (Add Action\>Update Current Topic\>True+1), and 3 (add 2 text fields, displaying the number in the corresponding database column), but now trying to solve:

1. How to make True and False input by the same user mutually exclusive.
2. How to make the particular statements a user has voted on, appear different to that particular user (so that she can see at a glance she has already interacted with this topic)  
I am unable to make my database collect a single For/Against value per topic from each unique user.

Any tips?

---

<div class="post-metadata">

**Author:** ![anon78309838](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@anon78309838](https://forum.adalo.com/u/anon78309838)\
**Post date:** [October 19, 2020, 11:03am UTC](https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696/4 "2020-10-19T11:03:27Z")

</div>

Sorry for getting to this so late:

1. You could put this in the user collection and filter it by logged in user (or current user).
2. Using visibility settings you can create 2 components. One for if the user has interacted with it and one when they haven’t. Then in the visibility settings you can create the filter based on the count of that action. Or if the count doesn’t matter, you can make it based on the user who performed it. (Email = logged in user’s email).

---

<div class="post-metadata">

**Author:** ![Simba](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Simba](https://forum.adalo.com/u/Simba)\
**Post date:** [October 19, 2020, 4:53pm UTC](https://forum.adalo.com/t/how-to-add-counter-as-a-property-in-a-database-collection/4696/5 "2020-10-19T16:53:31Z")

</div>

That’s exactly how I had already done it. Thanks, anyways!
