SQLQuery tags in UDT

I have created a udt where each member is a separate sqlquery tag. This seemed chatty so I combined them into one sqlquery tag with a datatype of dataset which worked well. Now, I need to trend and alarm on each of the columns in the dataset. I tried creating a new memory tag for each column and referencing the dataset within the udt. I couldn’t seem to get that to work. I then tried a value changed script on the sqlquery tag with the aim of writing directly to the other members of the udt.

Is this the right approach or am I way off? If so, what is the syntax to resolve the row/column in the dataset. Note, there will only be 1 row in the dataset.

Hi! Welcome to the forums!

Try an expression tag. From the manual:

Dataset_Name["Column_Name"]    //returns the value from the first row at the given column name
Dataset_Name[Column_Index] //returns the value from the given column at the first row
Dataset_Name[Row_Index, "Column_Name"] //returns the value from the given row at the given column name
Dataset_Name[Row_Index, Column_Index] //returns the value from the given row at the given column index

OT EDIT: Hey! 1500 posts! :smiley: