Powerchart data source

DB Table Historian Provider doc shows an example of filtering below:

Blockquote
histprov:DB Table_Historian: / table:machine_values: / column:process_value: / timestamp:time: / keycolumn:machine_id: / keyvalue: 1

how can I use a variable as the value of the keyvalue, for exampe from a view parameter?

Well, that depends, will the number of pens be fixed? What exactly are you trying to accomplish other than filtering?

In theory, if say you were ever only going to have one pen, then you could put a binding on props.pens[0].data.source and then use an expression to build the string.

However, this can also be done with an expression structure or scripting. The exact approach will depend heavily on how dynamic you are trying to make the view. For instance I have scripting that allows us to load saved charts from a DB, that requires dynamically loading pens into the chart.