Adding tag bindings to components through scripting

I have a startup script that is building a table dynamically. Right now I am just reading tag values and adding them to a big dictionary which I then set to the data property of the table. I want these values to be bidirectional bindings to the tags so that users can write to the tags directly from the table and the table stays updated. Will this be possible? I can't seem to find a way to write tag bindings through scripting.

  1. Please tag your question as vision or perspective.
  2. Is there any possibility of something else (PLC or other user) updating the tags? (This would present an extra challenge.)

Added the tag, it is perspective. The tags I want to allow edits on are in a UDT I created for alerts and alarms and those are only updated through Ignition. I could create a button that would push updates to the tags but that would not be as clean a solution

You cannot in Perspective. (It is possible but challenging in Vision.)

Even if you could, a table component does not write back to itself, so any bidirectionality would never trigger. Tables delegate to scripts when cells are edited So, you could have the table perform the writeback that way.

But the canonical way to do this is with a table cell view renderer. The table would contain the tagpath in the column intended for data display/edit, and the corresponding entry in props.columns[] would set view rendering, and the view path. That view would receive the tag path in view.params.value and could then use bidirectional indirect binding on an entry field. This takes the editing out of the table and makes it happen with ordinary entry fields.

With this approach, the table's is static.

Hmm, I think this will work for me. I'll have to play around with it a little but thank you for the suggestion.