24.07.2018, 11:46
I'm trying to do scheduled scan of a tag weekly to ultimately send me an email with a report if something is wrong. However, I'm seeing that some info is left out. Logically I can see why, but I'm having some trouble fixing the logic for myself to see the solution...
First edition of script:
Output in the log:
As you can see I'm missing the name of the second ECG with failure. Any suggestions?
First edition of script:
Code:
ecgFail = grp.tag('ecgFailure')
total = 0
for index, value in ipairs(ecgFail) do
if value.data == true then
total = total + 1
name = value.name
end
end
log('Found '..total..' ECG(s) with failure. Id´s: '..name)
Output in the log:
Code:
* string: Found 2 ECG(s) with failure. Id´s: L5 - DALI ECG 3, Failure Status
As you can see I'm missing the name of the second ECG with failure. Any suggestions?