How to display X number of zéro instead of the float or integer value

Good Morning everyone,

I’am looking to display 000000 instead of 6 from an int/float value.

I cannot figure out how to split the number form an integer or a float and to display 000000.

what would be the best way for you to do such thing ?

Kind regards,

You may need to clarify, this would produce an appropriate number of 0s:

But, somehow, I feel you’re looking for a more elaborate solution… Do tell.

Just like @Everynone said, other possibility is to check if the Int/Float equals 0

If not - show what it should show as the number, if yes - Make Literal String (000000) → ToFloat/ToInt and it will show this instead
image

1 Like

This one could help you for integer values:

or this one, achieving the same:

so 888 will give 00888 printed out, I assume, this is what you want to achieve?

EDIT: not really sure any more, but if you just want to print the number of digits given by an int, this works the same, provided you have a long enough base string.

grafik

Ha, none of us knows what OP really wants ;P. I was thinking:

instead of int 3, print 000

:man_shrugging:

1 Like

Well, I also had situations where IF some value equals something - show text instead (like he wants the multiple 0’s)

F.ex. If Players Online = 0 show ‘none’ instead of 0

The clarification of his issue doesn’t state that directly but I assume this is what he asked for :smiley:

And I like seeing so many suggestions :smiley:

Hello Everynone and All of you,

First off all thanks you for your time.

After a long day trying to figure out I came back and saw your posts…

Clarification :slightly_smiling_face:

I am trying to increment an amout of zero displayed in a textbox linked to a spinbox. I found during the day the solution but my code does not look good for me as i’am using a deprecated fonnction “ascurrency”

It works but i’am cheating, i’am using this deprecated fonction, i’am removing the currency and i’m replacing the 1 by a zero.

My goal was to display 3 zero if my spinbox has a value of 3 for exemple.

It works but i’am sure there is a simplest way to do it.

I found out in the ui designer this :

image

Nice, I was thinking to set the minimal integral of digit at runtime but I did not figure out how.

image

Thanks you again