Forum Discussion

AprilDrennan-f8's avatar
AprilDrennan-f8
Community Member
2 years ago

need three decimals for answer to calculation

Hi,

I am working on a slide where the user is calculating their tax rate. They should enter there rate (for example 1.5%) in the blue box. Then, the answer will appear in a percentage. That works fine. Next, I want to convert it into decimal (the second red number). When you add 1.5 you get an answer of 7.5. When Storyline does the calculations, it comes up with the answer 0.07 when you click on the Calculate Tax Rate button. It should be 0.075, if you entered 1.5 for example. Is my math wrong in my variables? Is there a way to change the default on how many decimal places show? Is there an easier way to accomplish this? Thanks!

  • Hi April,

    Thanks for reaching out! Numeric variables such as TotalTaxRateDecimals in your project contain all the decimal values but can only display two. While there's no built-in way to adjust this, some community members have offered an unsupported workaround for displaying more than two decimal places using text variables. Take a look and see if this will work for you:

    I hope other JavaScript experts in our community can also chime in here to share their thoughts!