Show float value with no decimals or commas

I am creating an Ignition program from an existing plc. I am reading in a float value. I want to show this value with no decimals and no comma if the value gets that high. I am using vision and have tried putting the value into a label expression. I am having no luck. The tag itself is a UDT tag and I have tried to change the format for this tag but it does not seem to be doing anything to change it.

Here is my UDT value along with the format expression set to 0 with no decimal points:

Here is my label expression where I am combining text and the value itself along with what I am seeing below:

I want it to show > 99, not > 99.0.

Side note on this, I have other values where I feel I will run into the same issue. Even with values coming in as float I want to show most of them with no decimal points. I was thinking I could get slick and add a UDT parameter where depending on the parameter value I can change what the format of the value will be. Anyone do something like this or have any other thoughts? Thanks

Did you try the Expression Language's dateFormat() function?

Note that you can split your expressions across multiple lines for ease of reading.

1 Like

Its not a date, just a simple float (real) value coming in

I think @Transistor meant numberFormat


Ah ok, that makes more sense. I'll check it out

Thanks transistor! Got me on the right track

1 Like

It worked great except I still see a comma when the value is at or greater than 1000. Anyway I could not show a comma?

What format are you using?

Its a float value. Formatted it to show no decimals but still showing comma.

Thus, the question. :wink:

1 Like

I got it. Missed the Number Format Pattern. Once I put that to #0 it shows up correctly

1 Like