• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

New Here ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

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.

Views

290

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

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.

 

Stagprime_0-1592485893843.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

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.

 

Stagprime_0-1592489088446.png

 

 

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

I am sure they are awesome time savers - and you'll notice I am not even offering a JavaScript solution but trying to answer the questions. My statements are no different than your own when you declare that you personally don't do something for some reason.

 

That aside, it appears to me, based on the original post, that the desired outcome is that a message or image of some sort is to show based on the selection.

Perfect!

 

OK - let's keep with the Pizza example.

Checkbox 5 with value of  Pizza  has been associated with variable named  box5

When box is checked, the variable  box5  is assigned the value of  "Pizza"

Now on the Submit button we make an advanced action that includes...

(Please forgive my way of writing it - it is how I picture what is happening. It isn't meant to be syntax correct - just context correct.)

 

if (box5=="Pizza") {

show  PizzaPic

show  smileyFace

}

else {

hide  PizzaPic

hide  smileyFace

}

 

That way - if the box is deselected - those images will not show.

Conditions based on the other selections would, of course, need to be crafted but hopefully this helps get to the heart of the questions.

 

If original poster has more questions - I am happy to assist.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

Have some other suggestions, about using multistate objects instead of hide/show.  Reason why I asked to see the advanceed action the OP is using.  You would need a conditional action with 5 similar decisions in this case. If the user is a allowed to revisit the slide and/or change the answer, multistate objects are easier to solve those situations.  And states can have multiple objects... not need to create groups for show/hide.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

Yeah - multistate objects are great. That might work - depending on true needs.

OP stated they had 10 boxes and since multiple items can be selected with a checkbox interaction, it seems they may still need 10 separate images/messages so that multiple selections can be made and displayed.

If they have a single object with 10 states how do they show multiples?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

I understand that a state can have multiple objects in it... but ... let's just say that I would not want to create as many states as it would take to cover all the possble combinations of a 10 item checkbox list.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

Misunderstanding: I mean one multistate object per item, with a Normal state which is empty. When you revisit the slide and do not activate 'Retain state' the Normal state will appear, and you can reset the variables for the interaction to 0... I was not talking about one multistate object for all the checkboxes. Even if the second state needs only one object, this is a solution which works  even in Fluid Boxes projects.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 18, 2020 Jun 18, 2020

Copy link to clipboard

Copied

LATEST

Stagprime_0-1592493837410.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources