Dynamic change of named query for TimeSeries Chart

I am trying to change Named Query dynamically in Timeseries chart from a dropdwon selection.

I had created a view in MySQL with columns as tagid, intvalue, floatvalue, t_stamp, ist_datetime, utc_datetime.
and created 2 Named query in Ignition as 1) ist_datetime, intvalue and 2) utc_datetime, intvalue.

On timeseries chart both namedquery works fine.
I had created a dropdown to switch between IST and UTC named query so same should be reflected in timeseries chart and other places but not able to find a way to do this.


A named query binding can't dynamically change its named query. You can do this using the scripting function system.db.runNamedQuery. Use a property binding to you dropdown value, then use a scripting transform to run you named query based on the selection and return the dataset.

1 Like

Thanks alot