Skip to main content
Participating Frequently
March 29, 2023
Answered

<CP - Advanced actions - Expressions> shows "0"

  • March 29, 2023
  • 1 reply
  • 838 views

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:

  • remove the varialbe and adv action and then re-create
  • rename the varialbe and adv action to ensure the title is unque

 

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"

 

 

    This topic has been closed for replies.
    Correct answer Lilybiri

    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


    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.

    1 reply

    RodWard
    Community Expert
    Community Expert
    March 29, 2023

    Which event are you using to trigger the Advanced Action?

    Participating Frequently
    March 29, 2023

    Hello Rod, 

    Thank you for responding my issue. 

    I insert the varialbe directly in the text box. 

     

    Participating Frequently
    March 30, 2023

    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.


    Thanks for sharing it. It's great to have the resource