Hi - I am using our upvote button template but I would like to limit the number of votes each person can cast. How can I do that?
I tried to make an âenhancedâ version of the voting template in a single table based on a voting limit.
Let me know if it helps.Cheers.
Thatâs awesome thanks!
C
Thanks @Federico_Stefanato! I built off your example and created a version of the voting table with buttons that only allow 3 votes per person. After 3 votes, the buttons wonât perform an action.
Sharing in case helpful to others.
Thanks, Sean. It works greatly!
Now I wonder if I can actually disable the button if the voting limit has been reachedâŚ
if you add a variation on the condition to the disable option:
[Voting table].Filter(Upvoters.Contains(User())).Count() >= [Vote Limit]
it does what you say want, but I guess this not what you had in mind when asking the question since it disables all the buttons and my guess is you only wanted to disable the buttons with the âlikeâ on it, right?
To disable a selection of the buttons, we should define the paramaters accordingly:
[Voting table].Filter(Upvoters.Contains(User())).Count() >= [Vote Limit] and thisRow.Upvoters.Contains(User()).Not()
Cheers, Christiaan
Thanks for the speedy response, Christiaan. I came to find the same alternative solution yesterday very late, haha.