Hey there @shacharl1 !
I think it’s a matter of function nesting and scopes (in Java Script meaning).
Any particular reason you need to do it that way?
Happy to search for the solution to your problem - just please let us know what you want to achieve with this Action script.