I'm trying to do something very basic here but unfortunately the IF statement is not working
In the log I can can see the Alert from the field
If I remove the IF statement, it will update the device fine. I changed value with spaces, without spaces, uppercases and etc. Something very basic that I'm mssing.
In the log I can can see the Alert from the field
Apr-21 12:53:57 PM | mySQL | Alert |
Code:
\ Sub Main(ByVal Parms As String) ' dim Example as String = ParmArray(0).ToLower 'First Parameter: Dim ParmArray() as String ParmArray = Parms.ToString.Split(",") dim DeviceRefParm as String = ParmArray(0) dim DeviceAlert as String = ParmArray(1) dim DeviceWarning as String = ParmArray(2) hs.writelog ("mySQL", DeviceWarning) [B]if DeviceWarning = "Alert" Then hs.SetDeviceValueByRef(1077, 100, True) ' Set Virtual Alert if Parameter 2 is set to Alert hs.SetDeviceString(1077, "Alert2: Device " & Dev_DeviceName & " is " & " not responding " , True) end if[/B] End Sub
Comment