Incauto
(Incauto)
April 3, 2020, 7:57pm
1
Hi, not all documents has the field "seconds", so I check for it, and then check if the value is not null, but I keep getting null results,
if (doc.containsKey('seconds')){
if (doc['seconds'].value != null){
return doc['seconds'].value;
}
}
Any clues on what is happening?
the field is a number
return type number
elk 7.51
tsullivan
(Tim Sullivan)
April 7, 2020, 7:59pm
2
The return type is number
only when the if
is true.
To me, it looks like the script needs another return
and the end, and provide a fallback when the value is null.
system
(system)
Closed
May 5, 2020, 8:11pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.