I am using the following ruby code but getting an exception about "ruby exception undefined method between? for nil:Nilclass"?
event.set("[weekInMonth]", 2) if event.get("[tempDay]").between?(8, 15)
What should I change this to? I am trying to use this for multiple things.
Badger
June 14, 2019, 1:19pm
2
That suggests that some events do not have a tempDay field.
Is there any way to modify the ruby so it does not give the error. For example, if nil then skip.
code => '
t = event.get("[tempDay]")
if t
event.set("[weekInMonth]", 2) if t.between?(8, 15)
end
'
system
(system)
Closed
August 6, 2019, 1:04pm
5
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.