Radio Buttons for Likert Scale

Nov 14, 2022

Good afternoon heroes!

I'm making a likert scale interaction for five different questions per slide. I built it so that it totals at the bottom but what I'm having issues with is that each radio button can be hit multiple times and it keeps adding that number, and it is not showing a state of visited. 

So basically the numbers increase, but it looks like the user hasn't selected a button on the slide.

 

Thank you for your help!

10 Replies
Walt Hamilton

This trigger (and all the others like it) is your problem.

The built-in states (the ones with names that show in the name drop-down) have built-in superpowers, and take it as a huge insult when you create a trigger to duplicate their superpowers. That causes results that are sometimes spectacular but seldom useful, and always unpredictable. In this case, the visited state doesn't show, and who knows what else. The main superpower is to perform their action when clicked. In the case of Visited, it is to change to Visited state when clicked. Delete all of these triggers.

The other problem is that multiple clicks keep adding to the total. I recommend starting with this trigger:

Then change each of the "Add 1 to variable..." triggers to this form:

It is much more accurate to count once at the end than it is to continually add one (As you have found out).

 

Judy Nollet

Hi, Mark,

Here are some suggestions:

  • Remove the Visited state from all of the radio buttons. You just need the Selected state to indicate the selected buttons. 
    • Also note that with built-in states such as Visited and Selected, you don't need triggers to change to those states. An object with a Visited state will automatically switch to that when clicked. An object with a Selected state will toggle between Selected and Normal (or Selected & Visited) when clicked. Add triggers to do what the program already does is more likely to cause problems. 
  • Currently, it looks like all the buttons are in the same button set. There should be a separate button set for each row. That will let the built-in functionality do its job of only letting one button in a given row be selected at a time. 
  • You should also use a separate variable for each row. Adjust those variables with triggers attached to the associated buttons. For example, the button 1 in row 1 sets the corresponding variable to 1. 
  • The easiest fix for the addition problem is to have a separate button to add all the row variables after the user has selected an item in each row.
  • However, if you really want to calculate on the fly, you could this: 
    • Add a blank layer that will reset to initial state when revisiting. 
    • On that layer, add triggers for calculating a Total variable when the timeline begins.
      • Start with a trigger that sets the Total to 0. Then have triggers to add the value of each row variable. 
    • Add a trigger to each button that shows the calculation layer. Then the layer's timeline will restart, and it will run all the Total calculation triggers. 
    • Put those calculation triggers on a layer means you don't have to put them all on every button. 

BTW, here's my post about tracking custom surveys: 

https://community.articulate.com/discussions/articulate-storyline/tip-track-responses-to-custom-questions-or-surveys 

Walt Hamilton

Sorry, I posted before I finished attaching. Judy's suggestion about button sets is a good one.

I'm not sure creating a separate variable for each row saves any work, but if you want a running total, a separate layer is the way to go. Just be sure to give the layer a short timeline, and automatically close it when the timeline ends.

Mark Hoffman

So I created a separate variable for each row and created new button sets. I was still running into the issue of it duplicating every time you click a button (i.e. 1 + 1 over and over again with row one if you wanted) I attached the newest version. I've made variables for each row and a calculation layer that sets to 0 when the timeline starts there and has each variable add to that Count1 variable when it starts.

Any help is appreciated! I'm not sure how I broke it this time

Judy Nollet

Your button triggers are out of order and more complicated than they need to be.

  • Triggers run in order, so you need to set the value before you show the calculation layer.
  • Also, you don't need a condition in the trigger that adjusts the variable. When a radio button is in a button set, clicking it puts it in the Selected state. The only way to deselect it is to select another button in the set. 
  • This shows your triggers on the left and how the updates should look on the right:

Also, the calculation-layer trigger that resets the value to 0 needs to come first. (Again, trigger order is important!)

Finally, I strongly suggest that you get in the habit of giving objects meaningful names, especially one used in interactions. Good names makes development and troubleshooting much easier. For example, your radio buttons could follow a naming convention such as "r1-b01." That would indicate the row and the button value. Note that I suggest 2 digits for the b##, because there are 10. This will keep the buttons in order in the trigger panel (which uses alphanumeric order). 

Judy Nollet

FYI: You might want to add a temporary text box that shows all of the variable values, just to ensure the buttons are working as expected. For example, add a filled text box over the row labels, since you don't need to see those when testing. Then, after you've got the slide working, you can delete that text box (or just move it off the slide if you think it might be handy in the future).