We’re using widgets on dashboards and trying to just have a sort of drag and drop interface where the user selects the tag they want to watch and everything is provided in the UDT, The label for the widget, The machine name, the value etc.
I have a perspective container that has a parameter on it of simply “tagpath”. When the user drops the widget on the screen there will be an edit screen come up and ask them which tag they want, so the idea is the user selects the “Press Performance” UDT. Inside the UDT we have a value just called “Label” that will be the label on the widget so I don’t have multiple users naming it all sorts of things like Efficiency, Performance, Status, Etc. In the label itself on the widget I’m trying to bind to that UDT parameter, and then read inside the UDT the memory tag that says “Press Performance” . This is what I’m trying at the moment:
Script that doesn’t work:
def transform(self, value, quality, timestamp):
"""
Transform the incoming value and return a result.
Arguments:
self: A reference to the component this binding is configured on.
value: The incoming value from the binding or the previous transform.
quality: The quality code of the incoming value.
timestamp: The timestamp of the incoming value as a java.util.Date
"""
system.tag.readBlocking(self.view.params.tagpath."Label")
return value
Any help would be greatly appreciated, thank you!