Induce tag quality overlay on embedded component in Perspective?

We use embedded flex views for building nearly everything within Perspective, and the core parameter for these views is often a tagPath parameter.

We’d like to have the ability to show Ignition’s built-in tag overlay around the entire embedded view based on tagPath.quality. Is there any way we can hack that and induce those overlays based on a tagPath?

There isn’t a way to have the Embedded View display a Quality Overlay instead of whatever component inside of the Embedded View unless you actually have a binding on the Embedded View which also uses that tagPath in some way.

So… Here’s a hacky way to force the Quality Overlay onto your Embedded View:

  1. Add a new property into the props category of the Embedded View (I named my new property “quality”).
  2. Supply the path and params values as you normally would.
  3. Assuming a param name of tagPath, bind quality as an indirect tag binding to {this.props.params.tagPath}.

As a result, the Embedded View will get an overlay anytime the indirect binding fails to resolve with a good quality. Note that in my example the displayed Label does not have an overlay because it is simply displaying the passed tag path. If you don’t want your internal components to ALSO have overlays when the tag quality will be bad, then you’ll need to set the “Overlay opt-out” checkbox within the binding dialog accordingly for those components.

Another option, theoretically, would be to have your view(s) return code and level output parameters that you can pass into the qualifiedValue expression function. Cody’s way is going to be a whole lot easier to set up, though.

Thanks! We were able to get this to work. I found another way to do this by placing an empty label in the view. I added a quality property to the label and set an indirect tag binding to the tagPath parameter in the view. This has the advantage of not having to add properties after embedding the view.

1 Like