How could you add the thousands separator to a texbox or label number?

help
math
aia
beginner
extension

#1

how could you add the thousands separator to a texbox or label number?
for ejample convert 10000 in 10,000 in a texbox or label… thanks


#2

You are getting this for free.

image

I might consider developing such algorithms for a fee at some point…


#3

Hello, thank you very much for answering and sending me this example, but I have a question about how to implement what you sent so that texbox1 converts 10,000 to 10,000


#4

image

valueentered is a textbox.

redisplayed is a label, but could have been a textbox.
The problem in putting the value with comma back in the same textbox is that someone may launch the ‘groupdigit’ function again, and that would really mess things up.
Also, if the textbox is ‘numbers only’, it may have an issue with the comma.


#5

Thanks, when using the algorithm and running the application, the value of text box 1 is doubled in text box 2 without the comma


#6

Yes you should Sir… :grin:


#7

Try this

image

It appears the log function might suffer from some imprecision, and adding a small delta to magnitude will ensure that 10000 is interpreted as 10000 and not as 9999.9999.


#8

the same, I did what you told me and keeps doing the same.


#9

Use this free extension. And yes i know you can do this with just blocks.


#10

Hello @Jimmy_S.Gonzalez
Are you trying to do something like this one!!


If yes then let me know, I’ll explain you the logic and also share the blocks screenshots with a sample aia file. :blush:


#11

Show me your blocks. It works just fine on my side.


#12

I have a hunch that “12,34,56,789” is not what is desired.

Try “123,456,789” (with one less comma, and placed differently)


#13

This is Indian style of formatting numbers…
Different than the International Style


#14

I have made a little change in the blocks & design and now here the output!


#15

Hello, thanks for answering

What I am looking for is 10,000 20,000 50,000 100,000 100,000,000. the extension that I send peter works very well. But I wanted to learn to do it with blocks. but if it is so complicated, I prefer the extension.

Thank you very much for answering.


#16

thank you, it worked


#17

Yes, here it is, this what it does is repeat the number but without formatting 10,000


#18

I created the logic using the deafult blocks! I didn’t used extension here :joy:
Yup i also suggest you to use the extension that Peter suggested you. Extensions are made so to reduce the complexity of blocks and save your time too!!


#19

I see the problem.

It is supposed to be “[log(value) / log(10)] + 0.0001”, you put “[log(value)/log(0.0001)]”


#20

Yesss, thank you :blush: