I'm working with a UDT structure. In a previous project, I developed a tank template using parameterized UDT instances to display tag values dynamically based on the Tank Number. That implementation was read-only—no operator interaction was required.
For displaying values, I used property bindings such as:
view.params.BTankUDT.Current.Material_No
In my current project, I need to design a dashboard UI where operator input and control are required. Given this shift from a passive display to active interaction, should I continue with direct tag bindings as before, or implement indirect bi-directional tag bindings to allow for dynamic writes to the underlying UDT tags?
Bind only the UDT path, use indirect bindings to tags under this path for all items in the template.
Thanks for the clarification, David. Just to confirm, when you say "bind only the UDT path," you're referring to setting that as a custom property on the view or component and then using indirect bindings (e.g., {custom.udtPath}/Current/Material_No
) for individual tag values within the template, correct? That seems like a clean way to handle both read and write operations without hardcoding specific paths.
Appreciate the insight, just making sure I'm understanding the recommended approach correctly.
@David_Stone Thank you for sharing the insight. If possible can you please show an example or confirm what @michaeelphillips wrote.
This is exactly what I mean, this means that only one item changes when changing the UDT pointed to, and also this gives you the ability to do some other tricks:
- Write to tags with indirect references
- Bind to parameters and metadata like "EngUnit" of individual tags in the UDT.