Page 1 of 1

format on label component

PostPosted: Wed Aug 29, 2018 8:59 am
by andre1506345542
Hi

I have a calculated field, which I want to show on a label in a table view.
The calculated field returns a number variable. But it is always an integer.
The label now displays the number with one decimal. eg. 1.0 5.0 or 11.0 etc instead of 1 5 or 11

I have tried to change the format property of the label, but with out success.

How can I show the number as an integer.

Temp fix: Now, I return a string from the calculated field. But that is not really the way to go.

Thanks
Andre

Re: format on label component

PostPosted: Wed Aug 29, 2018 5:03 pm
by sean
Hi Andre,
I cannot reproduce this issue. The default format of the label should be what you see.

What version of Servoy?
And what client type please? (i.e. NGClient, Smart Client, etc)
What is the declared datatype of your calculation?
What format strings have you tried?

You could check your default number format on the servoy admin page. Perhaps it is #.0
But this would be overridden by the element format. So it's not clear to me why this happens.

Re: format on label component

PostPosted: Thu Aug 30, 2018 8:48 am
by andre1506345542
Hi Sean
I use 8.3.1 NG Client.
Declared value is a Number. As so far I know there is no integer.
The label is a normal servoy label on a table view. The calculated field returns a Number.

I have tried
####
####.
###0

On admin page the locale.numberformat and locale.integerformat are empty.

Thanks

Re: format on label component

PostPosted: Thu Aug 30, 2018 8:52 am
by andre1506345542
BTW Sean,
I tried to make a test solution but there it works fine. But I did not create a calculated but just a regular function.
We use i18n.setLocale, can this cause something.

Brdgs
Andre