Selecting Matching Records from Different Historian Tables

I have several Historian tables with hundreds of records. Each table consists of two columns. One column has Date Stamp values, and the other contains integer values. I also have the Date Range component that has time values, in the tables, are bound to it (Start and End Times.)
What I would like to do is once I select a record from one table, I would like the other tables with matching times to be selected as well.
The result of all selected records will be displayed on TextBoxes corresponding to each table.
I know how to send selected value from a table to a text box:

    if ({Root Container.Table.selectedRow}!=-1, {Root Container.Table.data}[{Root Container.Table.selectedRow},"my2ndColumn"],"")

But I don’t know how to bind all records to a specific time selected from one table…

Does anyone have any idea how to do this?

You’ll have to script it. The closest thing in bindings is the dataset lookup function, but that requires an exact match. Your script would search each dataset for the closest timestamp, and select that row index.

1 Like