How to subtract from variable on deselect - help!
May 23, 2019
Hi Gurus,
I am putting together a questionnaire with answer choices of A, B, C, so that the results should be a count of how many A's, how many B's and so on.
So far so easy. I used a count variable for each letter and a checkbox beside the letter that added 1 when it was selected. I also made each group of ABCD a button set so only one could be selected.
The problem is if someone changes their selection. It is still counting the old selection. I used "visited state" and the same thing happens. The variable still remembers that it was visited so still counts it even though there is a new selection.
Is there any elegant way of programming the variable to only count 1 if it is CURRENTLY selected and forget that it was EVER selected?
I am thinking it would be something like add 1 if state is selected, -1 if state is normal, but then all the not-selected ones would be in the negatives.
I am perplexed.
Please help.
Thank you!
25 Replies
I would love to find out more about your classes/teaching. Do you have a website where I can send you an email?
Victoria, I sent you a private message with more information.
This discussion is closed. You can start a new discussion or contact Articulate Support.