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

Checkbox and Advanced Action Not Working Correctly

New Here ,
Nov 01, 2016 Nov 01, 2016

I'm in Cap9 and struggling to make my checkbox widget interactions display the feedback message correctly.

When I test this question in playback, if the correct answers are checked the first time and submitted, I will get the Incorrect Answer feedback every single time.  Then I'll pick again, using the correct answers, and get the feedback message I expect.  It always is reading something wrong on the first time through.

Below is the widget in the display screen and its setup.

question.pngquestion_widget.png

And the advanced action that controls the feedback messages (SmartShape_702 is the Correct Answer feedback, SmartShape_703 is the Incorrect Answer feedback).

question_1.pngqueestion_2.png

I've gone blind trying to figure out why the Incorrect Answer Feedback is always presented when the first time that I test it with the correct answers checked.  Then if I try again, I get the correct response.

I'm to the point where I think it's in the IF statement, possibly with the null values, but I can't seem to tell anymore.  Does anyone see what's wrong with this?

TOPICS
Advanced
483
Translate
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

correct answers 1 Correct answer

Community Expert , Nov 02, 2016 Nov 02, 2016

Did you define that empty variable? It doesn't exist by default, it is not a system variable. I found that it is the only way to detect if something is empty. A variable associated with a TEB is empty by default, but I'm not totally sure that is the case for all variables, like the one you associate with the checkboxes. That could explain why it worked when you assigned the value of v_null to all variables.

Translate
People's Champ ,
Nov 02, 2016 Nov 02, 2016

You first check has contains instead of is equal to. Shouldn't make a difference but it is different than the others.

Did you create all of the variables with an initial value of "null"? It sounds like the variable are not initially "null". After the first time, you set them to null in the advanced action and then it works.

Translate
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
New Here ,
Nov 02, 2016 Nov 02, 2016

Thanks for your suggestion!  I did resolve this by creating an action on slide entry to set all the variables to null.

Translate
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 ,
Nov 02, 2016 Nov 02, 2016

Is 'null' an empty variable? I was a bit confused by the naming.

Indeed, would have recommended to assign the variable v_null (that is my way of labeling) as value to all the variables associated with the checkboxes, because you cannot do it when defining the variable. Another way would have been to give the variables a specific default value, and check on that value for the checkboxes that are incorrect.

Translate
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
New Here ,
Nov 02, 2016 Nov 02, 2016

Lilibiri,

I did read your blog entries about the v_null method and I tried various combinations of it but couldn't get the results to come out correctly.  I think it is because, in my world, null normally represents an empty variable, hence my confusion on what Captivate thinks null is.  .

But thanks for helping me get smarter on that checkbox!

Translate
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 ,
Nov 02, 2016 Nov 02, 2016

Did you define that empty variable? It doesn't exist by default, it is not a system variable. I found that it is the only way to detect if something is empty. A variable associated with a TEB is empty by default, but I'm not totally sure that is the case for all variables, like the one you associate with the checkboxes. That could explain why it worked when you assigned the value of v_null to all variables.

Translate
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
New Here ,
Nov 07, 2016 Nov 07, 2016
LATEST

Yes., that could have been the problem here.  I did go back and update the variable to have an initial value and that seems to produce more consistent results.  Thanks.

Translate
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