How to add counter as a Property in a Database Collection

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!

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?

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?

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).
1 Like

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