I have a “Thumbs up” like button. When a User clicks it, the Workflow adds +1 to the number of Likes to the Current Cell’s item, and adds the current User to the list of users who have Liked the item. Restriction is Only When current User is not already in the List of Users who have liked the item, so you can’t Like something more than once.
Additionally, I have a Conditional on the Icon, so that when the List of Users who like the content includes the current user, then the Icon changes to a solid Icon from outline only, so a User can see if they have liked something themselves alreadz.
So basically a User can like an item once and the Thumbs Up icon changes from outline to filled.
I can’t work out how to make someone able to Unlike the same item.
I tried to make the Workflow so that in the same workflow for clicking the icon, if the User is in the List of Users that liked the item, then the Number of Likes is -1 and that User is removed from List of Users that liked the item. And then the icon should go from Filled to Outline only based on the conditional.
However, that kinda means that the Workflow is maybe trying to Add and Remove the User at the same time, which is maybe why it doesn’t work?
Can anyone suggest anything? The only article I found about this showed how to add Likes, but skipped how to un-like something. I guess if the Icon changes when it is clicked, you should start the Workflow on the replacement Icon, but I can’t see how to do that as it is in the Conditional. Even if I remove the Conditional I can’t Like/Unlike.