# How do I create a voting system?

**URL:** <https://community.glideapps.com/t/how-do-i-create-a-voting-system/71835>\
**Category:** Ask for Help\
**Tags:** airtable\
**Created:** [March 20, 2024, 6:48am UTC](https://community.glideapps.com/t/how-do-i-create-a-voting-system/71835 "2024-03-20T06:48:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jarvis](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jarvis/32/81377_2.png) [@Jarvis](https://community.glideapps.com/u/Jarvis)\
**Post date:** [March 20, 2024, 6:48am UTC](https://community.glideapps.com/t/how-do-i-create-a-voting-system/71835/1 "2024-03-20T06:48:33Z")

</div>

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.

- 😔 - (will assign a value of 1)
- 😊 - (will assign a value of 2)
- 🥳 - (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?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [March 21, 2024, 12:51am UTC](https://community.glideapps.com/t/how-do-i-create-a-voting-system/71835/2 "2024-03-21T00:51:59Z")

</div>

> [@Jarvis](#):
>
> 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.

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

> [@Jarvis](#):
>
> 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.

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?

> [@Jarvis](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![Jarvis](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jarvis/32/81377_2.png) [@Jarvis](https://community.glideapps.com/u/Jarvis)\
**Post date:** [March 21, 2024, 1:49am UTC](https://community.glideapps.com/t/how-do-i-create-a-voting-system/71835/3 "2024-03-21T01:49:10Z")

</div>

> [@ThinhDinh](#):
>
> Or accept that you won’t be able to view what each user voted (whilst still being able to have an average).

Right. I’ll be fine with this.

> [@ThinhDinh](#):
>
> Can you have a math column on Airtable though?

Probably not

> [@ThinhDinh](#):
>
> If you want to sync that back, add a basic column and write the value of the math column back to Airtable.

Yep, will try this!

> [@ThinhDinh](#):
>
> I would use a choice component for this

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