03-26-2019 10:05 AM
I have a file where sometimes a custom channel property has a value of NOVALUE. I want to change these NOVALUES to zeros. However, I cannot find a way to reference the NOVALUES. These lines don't work (no error message either):-
Current_LowLimit = Data.Root.ChannelGroups(20).Channels(2).Properties("Current_LowLimit").Value
if Current_LowLimit = "novaluekey" then
Current_LowLimit = 0
end if
This line gives an 'Invalid use of Null ' error:-
msgbox Current_LowLimit
Is the script name for NOVALUE different? I have tried using Null, NaN, "", novaluekey without success.
Any help would be appreciated. Thank you.
Thomas.
Solved! Go to Solution.
03-26-2019 10:10 AM
Correction to my last post
the line :-
if Current_LowLimit = "novaluekey" then
should read :-
if Current_LowLimit = NOVALUE then
Sorry for the confusion.
Thomas
03-26-2019 12:46 PM
If IsNull(Data.Root.ChannelGroups(1).Properties("Custom_Property").Value) Then Call LogFileWrite(Data.Root.ChannelGroups(1).Properties("Custom_Property").Value) End If
So, try IsNull(property value)
03-27-2019 10:55 AM
Thank you!
Perfect answer.
Thomas