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
Hi Vicki
you can use a toggle variable - that might work better. Let me do a quick sample for you
oh fabulous, Wendy! thank you so much!
Also is there a way to add up the values of 4 count variables?
See if this works for you
OK, I will check it now, thank you so much!
Interesting. If I make them a button set, it doesn't work. They have to manually deselect it, Wendy.
If they forget to deselect when they make their new choice, then I'm back to the same problem.
Will they be clicking a button after they make the selection?
No, I just have them making all of their choices and on the last page it shows their results. I could have a submit button if needed. I'm not fussy.
See if this works. There is a submit button so everything is validated when they click that - this way you don't need to do the subtract trigger. There is a button set.
They can change their mind as many times as they like and it won't calculate but once they click submit, a shape is overlaid so they can't go back and change it.
This post was removed by the author
This post was removed by the author
Actually, it doesn't work because I have 16 questions (x 4 answers each) over 5 slides. I can only reference the Submit button on the last page, but then I can't reference the shapes on the 1st page. It only works if everything is on one page.
Bummer.
Thanks anyway, Wendy.
Hi Victoria.
Quick question: is there a specific reason why you are reason buttons / check boxes? Do you mind using static elements with hotspots?
Hi Victoria,
See if the attached models what you're attempting to achieve.
No, other than they get the checkmark in them automatically when selected, but I don't absolutely have to have that.
Wow Steve! That is completely working in your file! Hurray!
Now, I will see if I can recreate it in my file and let you know how I go.
Thank you so much!! Great work!
Do you have a file started - might be easier for peeps to help you if we can see the setup. You may be able to manipulate the likert scale survey slide where you can have a number of statements down the left and then the scale horizontally that would account for your A B C D.
Update - no Likert won't work - max 10 statements.
Hi all.
Purely posting for potential reference, but if you would like to have custom "buttons" or objects as your selection criteria, this solution might work for you.
Similar outcome, just difference approach =)
@Steve @Wendy Here is the finished product! Whew! So much work!
Steve - it works like a dream, very robust in that I can go back and change answers and it still gives me the correct scores.
It was a lot of work, but I am so pleased. Where did you learn such Articulate Wizardry?
Steve, I have uploaded the completed file below .
THANK YOU SOOOOO MUCH!
You must tell me where you learned this Wizardry!
Uploaded! So much magic went into this.
Very cool! I am saving that for reference. Thank you so much, Joey!!
Great job, Victoria! Very well done! (Apparently, I'm an "I" learner.) I can see you put a lot of effort into this.
Where did I learn my "Articulate Wizardy?" I started with Articulate software around 2005, back when Studio was called "Articulate Professional." Before that, I used an advanced tool called Authorware for over a decade. I started with Storyline with version 1 (I teach Storyline and other Articulate tools online and in person on-site).
There's a lot you can do with Storyline in particular since it has variables, triggers and access to JavaScript. Once you have the end-goal in mind, just break it into small steps. As you discovered with your learning style assessment project, once you establish the variables you'll need and get the first couple of triggers in place, it mostly then becomes just labor to populate the rest of the slides.
Good luck with your assessment rollout!
This discussion is closed. You can start a new discussion or contact Articulate Support.