I wanted to use thumbs up / down to offer users a simple response to statements, which I could then quantify as a score (each thumbs up is +1, thumbs down -1). Quite simplistic, but tricky because to toggle the state of an icon you usually use a yes/no and create a workflow to set the state as ‘is no’ for each click. This is fine but yes and no are not numbers, so it was problematic when time came to update the score. I figured out a solution:
Instead I used a number state on the icons, and created a workflow like below:
( Arbitrary text:converted to number - (the state’s current number ← modulo → 2 ) * Arbitrary text:converted to number
For the thumbs up you use 1 for both arbitrary texts, for thumbs down you use 1 for the first and -1 for the second. This then cycles the thumbs up between 0 and 1, and the thumbs down between 0 and -1, and you can simply add this to the current score as part of the next workflow.
I know it’s quite niche, but thought it might help someone - I couldn’t find this solution on the forum!