Skip to main content
Participant
June 18, 2020
Question

What values do you set for variables associated to checklist widget items?

  • June 18, 2020
  • 2 replies
  • 717 views

Thank you all, in advance.,

This might be very simple, but I am lost as a newbie.


SITUATION:
1. I inserted a checklist item (widget) from 'Learning Interactions'
2. I edited the text for checklist items to what I want (10 items) and assigned (wrote) specific variables to each checklist item (simultaneously)

3. From Project>Variables, I created variables to match the names of the variables corresponding those in the checklist widget. So that I can use these variables for Advanced Actions scripts (10 variables matching the same variables names in the widget)
4. I created an Advanced Action script - conditionals BECAUSE I want, for instance, message/image to show IF those conditions are met
5. I created a 'Submit' button and assigned to it 'Execute Advanced Actions from properties/single actions menu, AND choose the Advanced Actions script I created in (4).

So far so good. PROBLEM:
At run-time, output is not what I want. Ticking/checking selected checklists is not generating event that I want.

 

REASON - WHERE I THINK I AM GOING WRONG:
I don't know what value to assign the variables so that I can write the Advanced Actions script correctly.

AND maybe I still don't get how variables in the widget work

 

QUESTION - IN SHORT
1. What value do you assign to a variable associated to a checklist (widget) item, so that conditional statements can be properly written in the Advanced Actions for a button to generate desired actions?

3. There are two possiblities at runtime: either the item is checked or is left unchecked - corresponding to two possible values for thge variable. But what is the value to write (either when creating the variable or when writing the Advanced Actions): 'equal to?', 'contains?'. What exactly is the value for 'checked'/'unchecked' for a variable associated to a checklist widget item?

2. Am I expecting something the widget/captivate does not allow?

 

Thank you and if you could assist, that would be fantastic.

    This topic has been closed for replies.

    2 replies

    Lilybiri
    Legend
    June 18, 2020

    Have published several blogs about using Learning Interactions. This is the most recent:

    https://elearning.adobe.com/2019/08/learning-interactions-tips/

    Something most newbies to Learning interactions having associated variables ignore is that you need to define those variables. Just typing in a name in the setup dialog box of the interaction is NOT sufficient.

    Make sure you recognize the variables as variables, I find the example screenshot posted by StagPrime bit confusing, because exactly the same name is used for the variable and for the choice which appears in the Checkbox list. 

    Only the variables linked to a choice which is checked off by the learner will be populated. You can then use that variable as any other (user/system) variable in actions.  I use this one (and the Radiobuttons interaction) sometimes to create custom questions. 

    Variables and their values are case sensitive. That is different from the Text Entry Box where you can omit the case sensitivity (same in a Fill in the Blank question). Can you check that?  Or maybe post the advanced action. I need to look for an example,  but most old blogs are still showing a SWF example.

    Stagprime2687219
    Legend
    June 18, 2020

    Well - I am a newbie to learning interactions... I don't use them. I make my own.

    I quickly threw one on my screen and tried to observe the behavior.

    What I witnessed is that my associated variable was assigned the value of whatever I typed in the box for the checkbox text.

     

    To the original questions then ,

    1. What value do you assign...?  You assign whatever is typed but you then use that value as a part of your conditional action when checking against the variable.

    2. What exactly is the value for checked/unchecked...?  If checked value of variable is the text written. If unchecked, the value is blank  ""

    3. Am I expecting something...?  Not sure what all is being expected but I do think you can get your images to show.

     

    So in my example if the fifth box is checked - my variable (box5) is assigned a value of Pizza. Now I can create an action that checks that variable and if the value is equal to  Pizza  then I can show a picture of a nice hot slice of pizza.

     

     

     

    I think the tricky part is that I did not see a way checking the box will do more than assign a value to a variable so to call an advanced action would require a separate button or method to do that. Perhaps that was one of the expectations.

     

    This would be why I would make my own - so that every check box would also call the action and show or hide my picture without a second button.

     

    Perhaps I do not understand how this is supposed to work, I can accept that, but that is the gist of what I saw.

    Lilybiri
    Legend
    June 18, 2020

    Completely understand due to your programming skills that you are looking down on those (pretty old) interactions. But they can be time savers for less programmer skilled people.  That is the reason I have been explaining them because (as usual) real good documentation is not to be found in the Help documents which are rather 'spartan'. 

     

    There used to be interactive interactions, but they are now all taken out of Captivate for some reason. The checkboxes interaction is a 'static' interaction, which seems a weird word combination. It means that it behaves exactlylike any other static object: text caption, shape (not defined as button), graphic, audio clip.  Since you can attach variables they become more powerful, but still are not interactive. To create an event (without JS) you need an extra interactive object, hence the Submit button used by the OP.  I used those interactions more when the real Knowledge Check slides were not yet available, because it was very cumbersome to get normal questions behave as KC slides. Now that problem is solved. I suppose the OP has a good reason to want to use the interactions.

    Stagprime2687219
    Legend
    June 18, 2020

    I believe that when you select the box - the associated variable is assigned the value of whatever you placed in the field marked checkbox text.

    So if my first checklist item is  Dog

    I would create my  if statement action to read something like the following

    if  var_box1  == "Dog"   then  do something

     

    Does that make sense?

    Stagprime2687219
    Legend
    June 18, 2020

    Perhaps this graphic will help clarify.

    I created a quick 5 checkbox list and five boxes to display each variable beside it.

    When the box is checked the variable is assigned whatever is next to the checkbox.