Set a default format for a database table column

I have not been successful using the default format for a table column.

I’d like 20.0 and 5.0 and 874.0 to be displayed as integers.
Prior to storing the TEXT field, I use Math.floor(x) to define an integer and it stubbornly shows a trailing decimal zero.

No luck in finding from where the trailing real number info is coming, but thought I’d just use the default format. Um, with no success.

thanks,
–Joe.
Servoy 7.4.8

Hi Joe,

To display a number without the trailing zero you use the format property on the form element.
For example you set it to #### if you want a to show (max) 4 digits without any decimals.

Hope this helps.

Hi Robert,

That’s what was expected. But setting the table to a default format, ####, causes only single digit numbers to show.

My remedy was to use the .toFixed() method, forcing the UI to drop the decimal.

When I get more time I’ll revisit the problem. Something isn’t working correctly and that never works well in the wild.

Thanks!
–Joe.