How do I create a voting system?

Hi. What will the best way be to create a voting system? Here’s my setup:

We publish 500 contents monthly, and we have around 100 users, all of whom need to vote on each content with a 3-star rating using emojis if possible, like this, or maybe the native Glide ratings component.

  • :pensive: - (will assign a value of 1)
  • :blush: - (will assign a value of 2)
  • :partying_face: - (will assign a value of 3)

However, the 500 contents are synced from Airtable, and I want the average rating value and the number of votes for each content to be sent back to the original row in Airtable. In addition, I might also later tweak the ratings system, like making it 5-star instead of 3-star, or changing the values for each rating, and when doing so will want the previous data to remain, if possible.

What’s going to be the best way to:

  • allow each user to rate each content individually? I’m guessing user-specific columns will help here
  • show the average of the user-specific ratings in a separate column in Glide
  • show the number of votes for each content
  • sync this average rating and the number of votes to each content’s Airtable row, without eating too many updates. Maybe I can sync it daily, but does that mean 500 updates daily will be used?

I would use a choice component for this, but the core problem is:

  • You would have to store each vote in a row to be able to aggregate it using a rollup
  • You would have to find a way to store voting data in a JSON object to use a rollup
  • Or accept that you won’t be able to view what each user voted (whilst still being able to have an average).

This might lineup with the 3rd option above. My thinking is you have a combo action to increment a total votes value column, total votes count column, then you can have a math column for the average. If you want to sync that back, add a basic column and write the value of the math column back to Airtable. Can you have a math column on Airtable though?

It depends on how you change your scale, but if you follow my steps above, you won’t able to map the old scale to the new scale since the values can’t be changed after the increment step. In this case, your best option is to store each vote as its own row, with the emoji as part of it. Have a table to map the emoji with a value, that’s how you would be able to dynamically alter things.

2 Likes

Right. I’ll be fine with this.

Probably not

Yep, will try this!

Alright, let me try making it, and then I’ll update here!

1 Like