I’m creating a voting system. Voting is fine, and every user has a 3 votes limit per idea (similar to https://www.uservoice.com/).
The issue is that while the user’s votes count is fine (find votes [from user]:count), the remove vote workflow always gets a wrong result (find votes [from user]:count) -1.
Looks complex, I might be tempted to have two different workflow actions. I wonder if it removing the voter “user” first, so that messes up your search ?
@NigelG I thought of use the value from the working logic, and subtract it from the current value, but I coundn’t do it…I’ll try something during the week.
Sorry. I just re-read your original post. I just realized that each user gets 3 votes per idea… haha
That being said though - in terms of UI - if you had a text box that shows a count (0-3) that’s counts how many votes the current user has submitted on that particular post…
THEN you could get away with having a
Votos = current cells ideas votes - 1 workflow.
A user would just have to click “remove” 3 times if they wanted to remove all three votes
(More workflows though, so not ideal + removing the user from the idea would have to be done in a different way)
Brackets may be needed - I personally don’t see anything wrong with your screenshot…
A vote button
A remove button
And a text box counter (for current user)
So when vote is clicked = +1
But when remove is clicked = current cells vote count - (text box’s value)
Then up to 3 votes could be removed with one workflow…
^ you may have to set the state of the text box to “current user” as well though - to avoid data overlap from other active users? I don’t know…
Sorry to bombard this forum posts ( some of my ideas anyway )
What I did was creating a “vote” object, so to count a user vote I do a search to find for votes created by current user with the name = current idea. This works, but the issue is to remove those same, the count goes alway 1
PS - thanks for posting, I’m stuck with this
PPS - I think the better solution is to get result from count that’s working and and in the remove wf instead of making the count again, just link from the count result - that made sense? I couldn’t reach that result in a wf…