Copy link to clipboard
Copied
Hello all,
CP version - 11.5.5.553
My calculation by using Expressions doesn't work at all - the result shows "0". The purpose is to display the total number of questions before the actual Question slide.
I tried:
Did I miss any? Thank you for any suggestions/feedback
Varialbe - v_Qcount
Adv Actions - "6" is the total number of those non-question slides
After publishing the project..... it always shows "0"
That's how you display the variable.
That won't automatically trigger the Advanced Action to do its job. For that you need a trigger event of some kind. If you don't trigger the action it won't do anything.
In your case I would suggest you will want it to be triggered by the On Slide Enter event of one of the first slides in the project.
You need to trigger it on Enter for the first slide. For more flexibility I would not use the literal 6 but the system variable cpQuizInfoTotalQuestionsPerProject:
Expression v_QCount = cpInfoSlideCount - cpQuizInfoTotalQuestionsPerProject
How did you test it? If this is a non-responsive project use only F11, Preview HTML in Browser. That is not needed for a responsive project, and you will only find that option when you have upgraded to 11.8.1. BTW the Preview Project in that most recent vers
...Copy link to clipboard
Copied
Which event are you using to trigger the Advanced Action?
Copy link to clipboard
Copied
Hello Rod,
Thank you for responding my issue.
I insert the varialbe directly in the text box.
Copy link to clipboard
Copied
That's how you display the variable.
That won't automatically trigger the Advanced Action to do its job. For that you need a trigger event of some kind. If you don't trigger the action it won't do anything.
In your case I would suggest you will want it to be triggered by the On Slide Enter event of one of the first slides in the project.
Copy link to clipboard
Copied
Rod was asking how you did trigger the action SMEQTotal? That action needs to be done before the slide where you inserted the variable in a text. If you insert the variable before it got its value using the Expression command, it will have its initial value which is set at 0.
Looking at the Expression, it is dynamic, because it depends on the system variable cpInfoCurrentSlide which is a counter starting with index 1. I think something is wrong with the logic. If you explained what you want to show exactly? Do you mean to use the value of cpQuizInfoTotalQuestionsPerProject instead of cpQuizInfoCurrentSlide?
Copy link to clipboard
Copied
I intend to tell users how many questions in this assessment. That's why I use <"cpIntoSlideCount" - 6>..
note: 6 means the total number of instruction slides and the result slide
Copy link to clipboard
Copied
You need to trigger it on Enter for the first slide. For more flexibility I would not use the literal 6 but the system variable cpQuizInfoTotalQuestionsPerProject:
Expression v_QCount = cpInfoSlideCount - cpQuizInfoTotalQuestionsPerProject
How did you test it? If this is a non-responsive project use only F11, Preview HTML in Browser. That is not needed for a responsive project, and you will only find that option when you have upgraded to 11.8.1. BTW the Preview Project in that most recent version is identical to F11, no difference.
Copy link to clipboard
Copied
Thank you both~~ Now, I have a huge progress - I set up a trigger as your suggestion. The number is correct but if I use "cpQuizInfoTotalQuestionsPerProject", v_QCount will be qual to cpInfoSlideCount... it seems "cpQuizInfoTotalQuestionsPerProject" actions as "0". My questions are all in Question Pool.
Copy link to clipboard
Copied
You didn't tell these were random questions... Indeed, in that case the value of that system variable is not updated correctly.
Copy link to clipboard
Copied
I was not aware that matters. Now I learned more about adv. actions. Thank you
Copy link to clipboard
Copied
There are more limitations to random questions as I explored them in this rather popular blog post:
https://blog.lilybiri.com/random-questions-dos-and-donts
If you want to discover more about advanced and shared actions (too much ignored), scroll through my blog. It often appears when using ChatGPT4 with Captivate questions, to my surprise.
Copy link to clipboard
Copied
Thanks for sharing it. It's great to have the resource