A/B voting system implementation (Part 2)

Hello Guys!

This is the follow up of the previous topic: https://forum.adalo.com/t/a-b-voting-system-implementation/5889.

I wasn’t able to reply the latest answers of the previous post within the 10 days that Adalo gives before closing a topic, so first of all I would like to apologise to @karimoo and to @franklbt for leaving no reply to their interesting comments.

@karimoo the best explanation of the app I is described in here: A/B voting system implementation - #6 by Victor. Please note that when a user is presented with 2 images and has to vote for one, an upvote is given to the selected one but a downvote is given to the other one.

Regarding your questions I’ll try to answer them in bold:

You describe that you want to vote on images, but the link to the users is in posts.
So what do you want to achieve with the voting?
What I want to achieve is an overall ranking for the most voted images and the least voted images.
The post collection has “user upvotes” and “user downvotes” fields which both are “users arrays” in which we store the users that either have voted for the current image as the prefered option (upvote) or users that have voted for the other image as the prefered option, therefore, the current image has been given a downvote.

Is it that you want to find the best image for a post?
Meaning a post can have several images and the user votes what fits best.
or
Do you want to find the most voted image in a certain category?
What I want to find is the most upvoted and downvoted images while comparing them by groups of 2.

What is the relation of posts and images?
A post is an image with some metadata like the user who has uploaded it, the date in which it was uploaded, the category in which the image belongs, etc.

What is the relation of category and images?
Images belong to a specific category (only one category per image) like nature, food, sports, etc.

Other questions I have:
What is the reason to separate upvote and downvote?
To Keep track of al the images that have been shown to a specific user (the ones that have not been shown are the ones with no Id of the user in either the upvote or downvote field on a specific post.

An alternative for voting would be to use just a number to increase or decrease the votings per image/post/category…
This would make ranking much easier.
Sure but I want to present always the user with two images so he/she must make a decision (voting for the favourite) and I do not want to show them the same image while voting.
At least I assume there is a sort of analysis/decision following the voting.
What are you going to do with the voting data?
I’m going to make a ranking for each category by day (most upvoted images and most downvoted images of the day by category)

@franklbt I have some doubts about your solution:

  1. When you create a Vote entity I can see that you are getting 2 posts via a random (RAND) method which means that I could be voting for the same image more than once, is that correct?
    Acording to my initial idea, the posts that are voted once by one user can not be voted again by the same user. Do you know how to solve this issue?

  2. What happens if a user creates an Vote entity but, for example never votes (closes the app). How do you delete this vote entity or how do you show it again to the user once he/she is back on the app?

  3. What do you get by creating the Vote entity collection?

Thank you guys for your time.

Hi @marc,

  1. Yes it is correct.
    Maybe the workaround could be to externalize your image collection to airtable or a custom backend connected to Adalo API.
  2. The vote entity is not count in any of the images.
    You can use conditional actions to redirect user to the vote screen if an empty vote entity exists for the current user.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.