Populating dataset

I have an array of 20 structs. I'd like to show each struct as a row in a table. I populated the table dataset using a custom method called loadeventlog() and a timer that invokes the method every 5s.

Is there a way to bind tag paths for each struct 1-20 to each row and have them update in the table as any other OPCUA tag updates, without this timer that rewrites the data to the table? Thanks.

Built-in to Ignition? No.

You might find my tags() expression function helpful.

They sound like static tags, Phil, so can just use cell update bindings on the table, creating one for each cell. Painfully slow to setup..

I don't ever use cell update bindings.

Cause they're a pain in the butt to setup? or other reasons? (I'm out of the loop with Vision these days...)

They are incompatible with dynamic dataset lengths. Which I pretty much always allow for in re-usable designs.

3 Likes

I would just make a "row" template and use a template repeater. All bindings, no datasets, easy to expand and add write capability to any of the data points.

That's a good idea, but I'd want to sort based on one of the columns. Do you think that's possible with a template repeater?

A fixed sort, or should the user be able to change it ?
Like selecting the column, reversing the order, etc ?

That would be more difficult, but doable if your parameter to the template is the path to the UDT

It can be fixed. One string timestamp column.

Then you could just have a script when the page opens to run through the UDT instance timestamps and put the path/index in the correct order for the template repeater. Exact implementation would depend on how the instances are named

1 Like

What do you mean, "string timestamp" ?

Where does the data come from ? If it's a db, sort in the query.
If it's a script, sort the data there.
If you can't sort at the source, there's a sortDataset expression function

It's from OPCUA not db.