Any way to change the display of an error message?

I have a perspective view with a lot of labels to display current values of a packing line (Current speed, bpm, etc.). Because of how these labels are scripted, done so by the guy who was three guys before me, at the start of the day when they do not yet have data to populate / display, they display an error message. This is a purely visual thing that the higher ups just don't like looking at, is there any way to script on either the components or even the view root to make it to where whenever a label (or chart?) would display an error, it just displays 0 or nothing?

Completely ignore any ideas of risk here from not having alarms, this is a splash page that the office chair people like to look at, there is no need for an actual accurate alarming.

There are a couple of simple tricks you could do without having to dig into the scripts. For example,

  • Create an expression binding on each label's 'props.visible',
    left({this.props.text}, 5) != "Error"
    or some always appearing text in the error.
  • If this messes up a flex layout or causes other problems you could, instead, create a similar expression binding on props.style.color and set the color to match the background color in the event of an error and a contrasting color otherwise.
1 Like