Forum Discussion
A Solution to rounding in Storyline – without using Javascript
- 8 days ago
Hello everyone,
I have some great news to share! We just released another update for Storyline 360. In Update 112, we’ve included essential fixes and new features. One of the new features we’ve included is:
- Simplify reporting with a built-in option that rounds quiz scores to whole numbers.
Launch the Articulate 360 desktop app on your computer to take advantage of this update, and click the Update button next to Storyline 360. You’ll find our step-by-step instructions here.
Please let me know if you need additional help.
See attahced a file that uses JS to round the input from a numeric entry.
I tried applying this JavaScript and it doesn't seem to work. I have an answer that shows as (i.e.) 10.454240362 and I want it to round up to 10.45
How can I apply a variable/JavaScript to make this work?
Thanks
Sandy
- OwenHolt8 years agoSuper Hero
Sandy,
You would use something like the following:
var player = GetPlayer();
var num = player.GetVar("Your StoryLine Variable");
num = Math.round((num + 0.00001) * 100) / 100;
player.SetVar("Your StoryLine Variable", num);