This statement searches the designated server for tags with "_flt_" in its name. I would like for the code to grab info from the server based off a list of tags, that I will provide in the code.
I would like to create some list or array with all tags that I would like information on and then place it into the ptList.. Do you know of a way I could do this?
Here is my Full Code
Private Sub CommandButton1_Click()
Dim ptList As PointList
Set srv = Servers.Item("cokepiserver")
srv.Open
Set ptList = srv.GetPointsSQL("Tag = '*_flt_*'")
ListView1.ColumnHeaders.Clear
ListView1.ListItems.Clear
ListView1.ColumnHeaders.Add , , "Tag", ListView1.Width / 12
ListView1.ColumnHeaders.Add , , "Trigger Val", ListView1.Width / 32
ListView1.ColumnHeaders.Add , , "Message", ListView1.Width / 8
ListView1.ColumnHeaders.Add , , "Date-Time", ListView1.Width / 12
ListView1.View = lvwReport
Dim mItem As ListItem
Dim pt As PIPoint
For Each pt In ptList
If (pt.Data.Snapshot = "OK") Then
Set mItem = ListView1.ListItems.Add
mItem.Text = pt.Name
mItem.SubItems(1) = "OK"
mItem.SubItems(2) = CStr(pt.PointAttributes.Item("descriptor"))
mItem.SubItems(3) = CStr(pt.Data.Snapshot.TimeStamp.LocalDate
'THIS CODE WORKS, BUT GIVES INFO ON TAGS I DONT NEED, I WOULD LIKE TO ADD THE LIST OF TAGS FOR WHICH I WOULD LIKE THE INFORMATION DISPLAYED
ex:
(My idea for adding in an Array) ' Dim tagPt As Variant
(Gives runtime error) 'tagPt = Array("aux_flt_spwst-qt", "aux_flt_srwst-qt")
ptList=srv.GetPointsSQL(tagPt)