How to pass "field" of a script being run in NODE-RED?

Hi, I’ve got a simple scripts that I wanted to use with NR, script has field “lights” which accepts names of entities to which one want to apply the script values.

I’ve been trying action, but there is no way to pass additional argument for “field”.

Any help would be appreciated.

Add your variable in the data section.