Skip to main content
kent83121408
Participating Frequently
August 16, 2020
Answered

Increment a variable for progress

  • August 16, 2020
  • 3 replies
  • 881 views

I'm using Captivate 2017. I've created an Adv Action that shows the progress of a module. However, the module starts after 8 slides. The progress shows a percentage completed as the learner goes through the module. I tried using the cpInfoCurrentSlide variable but its not accurate since it doesn't start on the literal 1. I created my own current slide variable but when the learner goes back a slide the progress decreases. How can I create a constant that only increments and stays constant when going back? 

This topic has been closed for replies.
Correct answer Lilybiri

I have written a couple of blogs to show the percentage completed for a project which has branching. Maybe they could help?

http://blog.lilybiri.com/percentage-progress-indicator-non-linear-course-solution-1

http://blog.lilybiri.com/percentage-progress-indicator-non-linear-course-solution-2

3 replies

TLCMediaDesign
Inspiring
August 17, 2020

I always create a variable called myProgress and set it using JavaScript behind the scenes, but can also be set on slide enter of each slide. It's initialized to 0.

 

The condition is if myProgress is less than cpInfoCurrentSlide

Expression myProgress = cpInfoCurrentSlide - 1

 

That doesn't set progress until the current slide has been viewed by entering the next slide and also does NOT decrement.

 

You could do a little math and set it to a percent.

Lilybiri
Legend
August 17, 2020

David, solution I proposed is also functional for non-linear projects. Works bit different but ...without JS.

Wonder if your solution, which seems to depend on a system variable is still working when the progress indicator should only start after 8 slides as the OP asks? 

Lilybiri
LilybiriCorrect answer
Legend
August 17, 2020

I have written a couple of blogs to show the percentage completed for a project which has branching. Maybe they could help?

http://blog.lilybiri.com/percentage-progress-indicator-non-linear-course-solution-1

http://blog.lilybiri.com/percentage-progress-indicator-non-linear-course-solution-2

kent83121408
Participating Frequently
August 17, 2020

Thank you. This is exactly what I was looking for. I think this will work. 

 

Ken

Lilybiri
Legend
August 17, 2020

You're welcome! Keep us informed.

RodWard
Community Expert
Community Expert
August 17, 2020

The value of cpInfoCurrentSlide is set when entering each slide, so you could have a Conditional Action set up to be triggered On Slide Enter that first looks at the value of your tracking variable and compares it with the current value of the system variable.  IF the system variable is greater than the current value stored in your tracking variable, THEN assign the tracking variable with the same value as the system variable, ELSE no action.