Hi.
I have this real value that has 15 decimals (unfortanely).
I wish to update a textbox with this real value, but round it down to 2-3 decimals and att “mbar” in the end.
I tried this:
event.source.text = numberFormat(system.tag.readBlocking(["[default]zB1ADFilter/MovAvg.value)"]), ‘0.000’) + " mbar"
But the error i get is numberFormat is undefined:
Traceback (most recent call last):
File "<event:propertyChange>", line 1, in <module>
NameError: name 'numberFormat' is not defined
Ignition v8.1.10 (b2021090812)
Java: Azul Systems, Inc. 11.0.11
@SKA, just as an aside, when you start a thread, it’s good to know what version of Ignition you’re using, and whether it’s vision or perspective, as the answers so far have already gone into the weeds with both.
Bind the text property to an expression, using the one @nminchin supplied.