Notifications
Announcements
No record found.
Hi
I have an simpel integer, and i was wondering is it possible to format it.
int formatMyInt = 5600000;
Is it possible to format the int to 5.600.000 ?
*This post is locked for comments
Hi Ashein,
This is possible if you create a string display method (or edit) where you set this formatting. In case of an edit method you can remove all non number characters.
Using an integer control itself is not working as an integer is a number only.
Hi Ashein
Could you share what you are trying to achieve.
In form level thousand separator is available by default. Also you can change the separator to comma(,) or Dot (.) in it's respective Extended Data Type "thousandSeperator" property
So it is only possible to format my integer if it is a string ? using a strEdit?
I have a table where i import alot of data (Integers) but the numbers are in the millions. And at the moment the number 5600000, 5999999, 4300000. I would like to make them readable, through form where i use intEdits.
Ashein
yes, As I said earlier, the thousands separator is controlled by the EDT of that field. You can mention it in the EDT property.
Thousand separator won't be available for Integer type. Why the field is Integer? not Real?
Use int edit controls and leave number formatting to Windows. Users from different countries or just different preference will get different formats, depending on their setup in Windows. Hard-coding a particular format as string would be wrong.
If you want to see different format by yourself, change your number format in Regional Settings in Windows.
Because the numbers i receive are never with decimals, they are only whole numbers Manish. Thats why they are integers.
But it makes sense not to edit them as strings as you said Martin.
So just to be clear there are no way to format integers, to make them more readable ?
You may convert them to real type, to get the separators by default. You can choose not to show the decimals if required.
Unfortunately it seems that IntEdit doesn't respect the format, but you could use RealEdit with NoOfDecimals = 0.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2