[Solved] I fixed the upvoting system

For anyone building an upvoting system and wants to 1) restrict voting to 1 & 2) un-vote when you re-click, here’s how it is done.

Start here: Restrict users to only 1 upvote

^ That solution allows you to build the basics. The problem you are stuck with: users can only vote/unvote 1 time!

The solution: Duplicate that workflow and reverse the conditions.

Here’s the logic you want implemented in the Duplicated workflow: ‘When then voting element is clicked, check - If the Parent groups’s List of Voters contains the Current User, subtract a vote, and remove the Current User from the List of Voters.’

In other words:

  1. Add 1 vote & the Current User to the list of Voters , when the Current User is not in the list of voters
  2. Subtract 1 vote & the Current User from the list of Voters when the Current User is in the list of voters

Now users can freely vote (& unvote by re-clicking the icon) in a normal way.