In a popup window that receives a UDT as input parameter (say a Tank UDT), I want to access the custom parameter of the UDT say TankNum, for use in filtering alarms associated with that instance of UDT in the display path filter in an alarm table.
I am trying to use an expression like "*Tank"+{Root Container.Tank::TankNum}+"*" in the display path filter of the alarm status table in the popup.
It doesn't give any error but it returns null for the expression {Root Container.Tank::TankNum}.
What could be wrong! How to access the custom parameter of a UDT in an expression? The property Binding window allows binding with the meta data and other properties of the UDT but not the custom parameters like TankNum.
How to access the parameters in an expression tag?
Use separate properties, one that only reads the value of the param of that UDT instance, and the other should be “*Tank”+toString({Root Container.Somewhere.readParamCustomProperty})+"*".
For the property that read the params just use an Indirect Tag Binding, using {1}/Parameters.param where param is the name of you actual parameter name at the UDT.
For {1}, set the TagPath Meta property from the UDT input.
To state my problem again, I have a POPUP window that has a Tank UDT passed as a parameter to it. The POPUP window displays some data and controls associated with that instance of the UDT. In addition I have an Alarm Status component defined in the POPUP window. By default it displays all alarms in the system. I want to filter and display only alarms associated with the UDT instance that is passed as parameter to the window.
I am trying to filter the alarm status table on display path for expressions string some thing like "*Tank "+the tank number corresponding to the Tank UDT that is passed as input to the POPUP+"*"
(it will result in filter string like "*Tank 1*" etc. But I don't know how to get the tank number corresponding to the Tank UDT that is passed as input to the POPUP
I understand from your reply that I should get the path of the UDT then access its parameters, but still not clear!
The "udtTemplate.udt::Meta.TagPath" is giving error! Lets say my name of udt passed to in popup is say tank, (In DB its type is Tank) then what exact expression should I use for the above expression ?
Thanks, I will try that. Is it also possible to pass the TankNumber parameter to the POPUP window in addition to the UDT instance? Then I can directly use this number in the indirect tag binding?
But this could be a round about approach, when the data in already available in the UDT instance passed to the POPUP.
Of course, but why would you want to do that when you can just read it indirectly?
I don't pass UDTTypes at all and just pass the path to the UDT (as deviceName and deviceParentPath) and indirectly reference the tags I need using these.
However the dynamic string for a Cell Update in an easychart component is not working with the same approach! I am binding the chart parameter using Cell Update binding like this
[~]TestTags/Tank {Root Container.tanknum}/tank PV
Where tanknum is the custom property added to the popup window and the Tank UDTs are Tank 1, Tank 2 etc. The tank number is dynamically generated using {Root Container.tanknum}
I am at the wits end to understand as to why this binding to Tag Pens for the easy chart doesn't work! The tanknum is custom property added in the popup as explained in the above posts!
Pretty sure you can’t use indirection. Tags or properties only. Do your tag indirection in custom properties, then reference those properties in this cell binding.
Anything that you need to use as an indirect in a cell update binding, create a new custom property that generates the tag path and then use that new custom property in the cell update binding.
Ah, I missed that it was an EasyChart. Yes, your dataset should end up with the correct strings. Have you checke the resulting dataset? (Export them to CSV to see tiny differences between working and non-working.)
(I thought you were trying to get the tag value into the dataset.)
Do the live dataset values and the customer properties values show up in designer, after launching the project using F10 key? Doesn't seem to be the case! Where are the live values of the custom properties and the data set available or how to export them in CSV?