Forum Discussion

rikapple's avatar
rikapple
Community Member
12 years ago
Solved

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

70 Replies

  • Hi Ed,

    You may want to share with LMS you're using so that folks can share additional information here. 

  • EdGen's avatar
    EdGen
    Community Member

    Has anyone found a way to remove the decimals points with the LMS?

  • PaulyBarnes1's avatar
    PaulyBarnes1
    Community 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.

    • shashankkatiyar's avatar
      shashankkatiyar
      Community 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.

    • MikeDelaney's avatar
      MikeDelaney
      Community 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

  • 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. 

  • 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.