Change Contents & Decimal points
June 23, 2016 12:00 AM
I have a variable which has been divided a number of times to find a percentage rate. After all the maths, the final number should be 0.0006825. When the variable is final, I create an Change Contents action to display the variable, but the outcome is 0. I was concerned I had the maths wrong but upon adding 0's to the end of the original input, I was able to move the decimal point up to being 6.825 etc. So the maths is right, I just cannot get the original output to display multiple decimal points. Is there a way to amend this?
Discussion (5)
Could one or both of you share your Lectora files? It will help speed up the investigation.
I could reproduce the issue. Something seems to be wrong with Lectoras calculation, maybe there is a rounding done sometime during the variable modifications:
When I use "Modify variable" action to
Action: Modify variable (Initial value is 25)
Type: Divide by
Value: 10000
the result will be "0".
If I do the math in a "Run javascript" action the output is displayed with all decimals.
Tim
Interesting. I'll bring this to the attention of our development team.
Discussions have been disabled for this post