So I was able to get visible to work with a tag that's null or a number. I used the same indirect tag settings for display and it doesn't work. Any thoughts?Thx, jake
You'll need to provide a bit more information for anyone to be able to help you.
What is your goal? To toggle display of a container based on the value of a tag?
Show examples of what you have tried so far that have or have not worked.
The display
property is expecting a value of true
or false
, numbers >= 1 will be coerced to true
while 0 is coerced to false
. Null is probably being coerced to false
. In your binding, you'll need to perform the necessary comparisons and conversions to end up with either true
or false
.
Some of the rows need to go away or stay if the tag is valid. An example of one of the indirect tags is [default]{Unit}/FirstStageSuctionPressure, Unit is a parameter passed into the view. This same tag works when using it on visible in a coordinate view.Thx,Jake
I've also tried an expression with if, if and isNull, never seems to disappear unless I hardcode the display to true or false.Thx,Jake
Is this a flex repeater or flex container?
How are you determining if the tag is valid? Show pictures of your configuration/bindings.
Are you checking this in designer only or in an active session?
Bottom line is, show some pictures of the bindings that work and the bindings that don't work. We can't see your screen so we have no ability to determine if its a simple expression or binding error or something else. Also, what version of Ignition are you on?
Not sure what a flex repeater is, I just created a view that's a flex container.
active session
Here's the visible one that works:
thx,jake
Add an expression transform to your binding with the following expression:
!isBadOrError({value})
worked like a charm, thank you kindly.
Spoke too soon, it does work, except on one, but it also hides it when it shouldn't. But certainly closer.
Does one of your tags have bad quality? That would cause it to hide as well as a bad path. You could also try !isBad({value})
, as bad tag path shows up as bad quality, as opposed to an error.
edit: You could also try
qualityOf({value}) != 'Bad_Disabled' &&
qualityOf({value}) != 'Bad_NotFound'
This is exactly the reason I asked Paul to add isAvailable
to his extensions module!
IsBad, isGood and the rest all don't have the right conditions to hide a tag. You don't want to hide a tag that simply has configuration errors or that is bad stale, or any of the other various bad qualities, other than not found and disabled. Bad not found and disabled are the only bad conditions you want to hide a tag on, as it doesn't exist or is specifically disabled
And actually, you need to use this:
indexOf(toStr(qualityOf({tag})), 'Bad_NotFound') = -1 &&
indexOf(toStr(qualityOf({tag})), 'Bad_Disabled') = -1
Since the quality returns a context (although I havent used this now in like 3 years since Paul added isAvailable to the module)