Forum Discussion
Rounding solution does not seem to work in 360
Hey there friends,
I've been trying to round the answer of Menu.SlideNumber/Menu.TotalSlides. The idea is to show the learner what percentage of the course they are at. I was able to produce the calculation, but it contains 2 decimal places.
I tried the solution described in the following thread, as most people point to this Math Solution:
I couldn't get it to work. I tried playing with the numbers you divide and multiply by, but I always seem to end up with 2 decimal places. I tried various JS solutions online and they do not work either. I read a note from someone that the Math Solution does not work when publishing in HTML5. Not sure if that is the issue. I've also read that the Math Solution does not work in Storyline 360. Not sure about that either.
I have attached the sample file I'm trying to build. The triggers for the rounding are in the Slide Master named "Rounding Master". The calculation is supposed to show beside the progress bar in the lower right, but I also duplicated it on the main screen for easier viewing.
Thanks!
Morris
- RussellKillips-Community Member
Hello Morris,
I think you should try using the Built-In variable called Menu.Progress instead.
You won't need to do any calculations and the number is already rounded.
- MorrisBonifaz-aCommunity Member
Thanks Russell. What does Menu.Progress calculate? The client was not interested in reporting the amount of slides viewed, but rather where in the course they are (which slide out of the total).
Thanks!
- RussellKillips-Community Member
- MorrisBonifaz-aCommunity Member
Just tested it, and it looks like it is measuring the slides viewed. I had that in place before, but they wanted it to show the percentage representing where the current slide is in the total course. I'm on slide 5 out 12 (what percentage is that).
Thanks...
- RussellKillips-Community Member
Try this one.
It uses Menu.SlideNumber and Menu.TotalSlides.
It also uses an execute Javascript trigger to round the percentage.
- MorrisBonifaz-aCommunity Member
Awesome, that worked! Quick question .... do you get a message saying:
"Javascript support is not available while previewing."
Not sure what the situation is with JS. Please advise...
- RussellKillips-Community Member
Yes, I get that message too. I rarely use the preview because of that issue.
- MorrisBonifaz-aCommunity Member
Unfortunately, that won't work out because it is in the Slide Master, so it will always be popping up. Is there a non JS method that you are aware of?
- RussellKillips-Community Member
I don't know a way of rounding without Javascript.
You could temporarily disable the javascript trigger. But remember to re-enable it for final publishing.
- sam123Community Member
Hi.
I am checking if there are any news on that topic. Does anyone know if it is now possible to round a number in Storyline 360 without JS?
TY
- WaltHamiltonSuper Hero
As of right now, the only other way is the link that Morris posted, and it is not always completely satisfactory.
- DebraMcClureCommunity Member
I need a solution to this too. I need the quiz score to get rounded and not include decimals.
Hello Debra!
I don't have a solution to share, but we do have this logged as a feature request. I've added your vote to our report so that we can track how many people are interested in this feature. I'll update this discussion if it's an item we add to our roadmap!
Thank you everyone for sharing workarounds so far!
- RebeccaOchoa-5eCommunity Member
Good grief. People have been asking for this for 13 years now. I would think that the company knows by now that is a feature people want. If you can't do it, just say so.