Name of the running scripted action within the running action

Hello everyone,

we're looking for a way to get the name of the scripted action being executed into a variable within the script. In our case we need it for logging. Everything that works when the script is run locally doesn't work when we run the script as a scripted action. Does anyone have an idea or is there a Nerdio variable that I'm not aware of?

0

Comments (2 comments)

Avatar
DStephenson

Welcome to the community, Andre Buettner 🙂!

As far as I know, there is not an existing variable for that, yet (see screenshot below).

You should be able to declare a variable (i.e. $ScriptedActionName = TheBestScriptedActionInTheWorld ) and be able to call it later on in the scripted action. I did something similar on this scripted action (Deploy ConnectWise Control with Scripted Action – Nerdio Help Center (getnerdio.com)).

I'm curious to know what your use case is for wanting to call the name of the scripted action.

0
Avatar
Andre Buettner
(Edited )

Hi Dave,

our workaround is to declare a variable as you mentioned. Right now we only need the script name to log. When the scripted action is executed we create a folder on the session host with the name of the action and we have a writelog function that logs some output of the script in it or when the script needs to do any software downloads it stores them in it. So our usecase is for a better clarity I would say.

0

Please sign in to leave a comment.