# How to force added zero to format as decimal

Hello Dear Community,
I am new here, trying to get a counter to work. With the so called procedure I was able to make the counter show the same amount of leading zeros (I know there are better ways out there) but my real problem is that even though the “format as decimal (2)” is defined as “rounds the number (if there were too many places) or by adding zeros on the right (if there were too few)”, it does NOT add zeros to the right. So whenever the counter reaches “0.10, 0.20, 0.30, etc” it shows as “0.1, 0.2. 0.3, etc”. Am I doing something wrong or does someone know a solution to this? It would be greatly appreciated! Thank you very much!

1. Because when you run the procedure the number becomes a text
2. When getting the length the decimal point is counted (thus you can lose your trailing 0

Here is a better leading zeros procedure from Taifun.

I suggest you apply it after you have done work with “numbers”

1 Like

Thank you for your assistance! I changed the setup to make a bit more sense and used Taifun`s leading zero blocks. It does work, however if the number is smaller than 2 digits (which they always are when the counter starts), or if the number has any decimals, it gives me error messages. I honestly dont know how to tackle these new errors because I dont know what exactly the leading zero`s blocks are doing.

as you can see from the example screenshot, the procedure works for 1 digit numbers, however for number with decimals you have to adjust it to your needs...

The exponent of a number says how many times to use the number in a multiplication.

example number=7, digits=4:
104+7=10007, now remove the first digit to get the result, which is 0007

example number=123, digits=4:
104+123=10123, now remove the first digit to get the result, which is 0123

Questions for you:

1. Which 1 digit number - digit combination did you use to get that error?

2. How should the result for a number with decimals look like? Can you provide an example?

Taifun

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.