Forum Discussion
decimal places in numeric variable
I don't know what I'm missing. I add a numeric variable, and if I set the default value to "0.00", the variable stubbornly reverts to "0". The other interactions work as expected: the increase and decrease value by 0.25 correctly sets the decimal place, but when the number gets to a whole number, there are no decimal places.
Hi William,
Storyline does not display trailing zeros. You can work around this with a bit of JavaScript (see attached). This involves sending the numeric value to JavaScript, having JavaScript round the value to two decimal places, convert it to a text value with the trailing zero (or zeroes), and then having JavaScript assign that to a text variable in Storyline. (Note: the custom text variable must already be created in Storyline before executing the JavaScript.)