r.float will give you any possible number/decimal between 1 and 10, which you can change to be any numbers, and then the 2 that comes after tells it to be rounded off to the hundredths place, which you can also change that to round to whatever
Hi - thanks for that. I have tried to use your format by replacing r.float(1,10) with the calculation I want it to round and it is still only showing 1 dp if the second dp is zero. Am I using it correctly?
Thanks!
(the part after the left bracket is displaying oddly! Sorry!)
I’m pretty sure there is no formatting control. I was also asking about support for currency handling back in May (Handling Currency Values) and nothing seemed available then.
Ok - thanks! So is my only work around to use a graphing component to find a way to capture the 2nd dp and then find a way to display it if that value is zero?
I have managed to make a workaround that checks if the rounded value to 2dp = 1dp and if it is, I manually add a zero to the content. I also check if rounded value to 0dp = 1dp and display an extra .00 if it is. I did this is all in the CL of the note rather than using an extra graph component,
Seems to work until the currency option becomes available.
Fixed it! I was getting it to check if the rounded value to 0 dp and 1dp were the same and then use that as a basis for assuming it was a whole number! I have added a check to ensure the rounded value to 2dp is the same as well before assuming it is a whole number. Thank you! If you spot any other mistakes please let me know.