"receivedCommand" in ECMA script?

Hello,
what is the equivalent to RuleDSL “receivedCommand” in ECMAscript?

In Rule DSL, I simply write

switch receivedCommand

When I write in ECMAScript

switch (receivedCommand)

I get the error

Script execution of rule with UID '85cf7682ea' failed: ReferenceError: "receivedCommand" is not defined in <eval> at line number 3

Regards

Just looked it up in one of my rules. The variable is called: ‘command’

2 Likes

Thank you!

This does work!

switch (command)