Forum Discussion
Results Slide Percent no Decimal Points
All,
I have a results slide which pulls in data from several other results slide.
The problem is that the results percentage is showing the percentage with decimal points. From a cosmetic point of view I would like the percentage rate to be rounded up or down to the nearest full number.
Is there a way to do this?
Thank you in advance
Rich
- RutwinGeuverinkCommunity Member
Although there aren't any built-in methods offered within Storyline, there are solutions/workarounds created by members of the community. One solution for rounding up the percentages is discussed over here.
Hi Rich,
As Rutwin mentioned there are no built in methods to round the decimal points, but it's been a common feature request of late if you'd like to join in and submit one of your own.
- PaulyBarnes1Community Member
I have some javascript code that may probably work for this scenario. Take the code and put it into an Javascript executable trigger on the results page and have it start first.
var player = GetPlayer();
var score = player.GetVar("Results.ScorePercent");
var n = score.toFixed(0);
player.SetVar("Results.ScorePercent", n);
The non javascript workaround can be messy in your triggers pane on the results slide. However, here is another solution. Maybe someday Articulate will make a consideration and have decimals as an option.- MikeDelaneyCommunity Member
Hi, I'm not a javascript guy and need some help on this, could someone walk me through the process of actually how to implement this? I'm sort of rusty using Storyline and would appreciate some screen shots.
best
Mike
- shashankkatiyarCommunity Member
Hi Pauly,
Can you just provide a short of example assessment with this Js so that that would be very easy for me to incorporate it.
Thanks for popping in with your suggestions Pauly :)
- EdGenCommunity Member
Has anyone found a way to remove the decimals points with the LMS?
Hi Ed,
You may want to share with LMS you're using so that folks can share additional information here.
- EdGenCommunity Member
Absolutely Ashley. I'm using SumTotal as my LMS and the issue is that the quiz is reporting scores with decimals such as 13.33% instead of 13%. Although I can round out the score for the user on the results slide, Storyline still reports the percent with decimals.
Hi Ed,
Within Storyline I know people round using Javascript to change the slide variable listed but as far as reporting that to your LMS - I'm not certain of the steps there and Javascript is not something I can offer support for.
You may want to review the method in this thread about rounding without Javascript - to see if something like that would work for you.
- EdGenCommunity Member
I attempted your suggestion along with many others. Looks like I have to accept that Storyline is not capable of this.
Submitted a feature request.
I am still open for suggestions.
Thanks.
Hi Mike,
I'm not certain that folks are still subscribed here, so you may want to reach out to Pauly or others using the "contact me" button on their profile to see if they're able to offer assistance around this issue.
- MikeDelaneyCommunity Member
Hi Ashley, thanks for reaching out. I actually figured this one out and am
planning on posting a play-by-play how to in the near future for people
like me who need the extra visuals and steps.Again, thanks.
Mike
- TeresaVanderposCommunity Member
Hey Mike, was curious if your non-javascript solution was similar to Tony's or not, would be curious to know what you did...