Cell update dynamic tag binding

Hi I am trying to do something similar to what was posted here:

inductiveautomation.com/forum/v … ilit=Scale

The post didn’t quite answer the question I was looking for.

Can a cell update binding reference a tag in the way that an expression can? The way we have set up our project is each generic popup window has a custom property called [color=#0000FF]TagPath[/color] which is a string containing the path to the tag. This can be used in expression bindings to access the tag and any of its tag members or properties like this:

tag({Root Container.TagPath}+"/EUMin")

Now, where i am running into annoyance is when I need to use the cell update bindings for dataset properties. The value of a cell binding can access custom properties on the root container by:

{Root Container.EUMin}

However that requires I make a bunch of custom properties on the root container to indirectly bind to different tag members.

If i can access a tag directly in the cell update “Value” column using something like:


Why can’t i access tags indirectly with something like:

{Root Container.TagPath}/EUMin

That just updates the table with a string of the path, not the tags numeric value.

Any advice how to do this better would be greatly appreciated, want to try avoid adding tons of custom properties to the root container if possible.

The limitation of the cell update binding can be frustrating.

One way to do this is to create an extra column in your table that is hidden that contains the address of the tags you are trying to read and then use a script to populate the appropriate column with the tag values.

For instance, using your example, create a table with 2 columns. The first column is the address of the tags and the second is the tag values. The first column addresses are built from the cell binding as you described it in your post and the tag values in column 2 are evaluated in a property change scripts that runs whenever event.propertyName == “TagPath” (move TagPath to the table as a custom property).

Hope this helps.

A possibility if you are going to be supplying values for every position in the dataset is to just construct the dataset from scratch with the elements you need. Something like this:objectScript("system.dataset.toDataSet(['heading1', 'heading2', 'heading3'], [args])", tag({Root Container.TagPath}+"/EUMin"), tag({Root Container.TagPath}+"/EUMax"), {Root Container.SomethingElse})Match the number of headings with the number of extra arguments. Shown with objectScript() from Simulation Aids, but also possible with runScript() in v7.8+.

Thanks for the replies. :thumb_left:

It’s a pity the cell update binding has these limitations, but thanks for the good ideas.
I will try and have a play with a simple script later if i end up needing a table with more cell update bindings than i can bear to input manually.