02-25-2020 12:54 PM
How do I check whether a string is empty? Or if a string is only full of NOVALUE/Null values?
For example, if I have a channel that malfunctioned and didn't record any data, the whole channel is empty/null/novalue. And I want to be able to delete that bad dataset. Below is some pseudo-code of what I'm trying to do:
i=1
Do while i <= GroupNumber
If String is empty then
Call GroupDel(i) 'delete current group
else
i = i +1 'move on and check next group for bad data
end if
loop
Solved! Go to Solution.
02-27-2020 03:47 PM
You can check if there are any NOVALUEs in the channel by calling
Channel.NoValues()
This will return "-1" if there are any NOVALUEs in that channel and you can delete it. If you are working with only numeric channels and want to make sure that the entire channel is NOVALUEs, you can simply check the max or min values and if they are NOVALUE then the whole channel is empty.