I'm little stucked and ask for small help from one with little more experience of vb script.
So, I have alarm control window Control1[Alarm control] which I need to filter when the screen is loaded. The filter is not constant but indirect (tagprefix).
As you see I added msgbox in end, and can confirm that the tagprefix is correct.
My script is like this today, but is not working:
(The script does work when I add my actual tagprefix as a constant i.e M1)
Guess there should be some wildcard around my prefix and I'm pretty close?
Sub OnGenerateScreen()
Dim prefix
prefix = Parent.Parent.Parent.TagPrefix
ScreenItems("Control1").MsgFilterSQL = "TEXT3 LIKE 'prefix' "
MsgBox prefix
End Sub
So, I have alarm control window Control1[Alarm control] which I need to filter when the screen is loaded. The filter is not constant but indirect (tagprefix).
As you see I added msgbox in end, and can confirm that the tagprefix is correct.
My script is like this today, but is not working:
(The script does work when I add my actual tagprefix as a constant i.e M1)
Guess there should be some wildcard around my prefix and I'm pretty close?
Sub OnGenerateScreen()
Dim prefix
prefix = Parent.Parent.Parent.TagPrefix
ScreenItems("Control1").MsgFilterSQL = "TEXT3 LIKE 'prefix' "
MsgBox prefix
End Sub