Loop Automation Command Action

Was that directed at me? Sorry I do not know what you are referring to as “it” - If it was multiple parameters such in Search Entity Screen I am doing that?

Ah “sleep” it is overrated! (That’s what I tell my wife…)

Hmm… a lot of things still need to execute via Automation Command Rule. I was hoping we just have one Execute script command in the rule and run everything in script, I guess not. Have to think about it more.

Wouldn’t it be cleaner if we have this Loop Automation then? Using dynamic ACM name, it is not problem for veteran here. I thought it would be easier average users to accomplish the task easier with this action. I think using script still need more expertise especially, passing data between automation and script.

I am thinking like average users point of view when they want to execute something they create rule and then add actions step by step then wait how can I loop this/how can I stop this. If there is this Loop action they don’t even have to touch script.

Well I was trying so hard to stay at this level but was drawn into the “Dark Side” by the force (picture @Jesse as Darth Vader…)

I just had another look at my Script and creating Multiple parameters using Data.Set() will do the trick so I could bypass your loop :cry: and stay in the script calling the ACM. For now no need to change a pretty good thing as it works.

1 Like

Still a lot of secret in the Dark side and now we gonna have black hole (GraphQL) for endless hidden secret lol

That’s why I mentioned it here. Having more GraphQL functions will improve possibilities.

I have not seen this before. Added to the Helper doc. Are there more?

2 Likes

I can see this being very useful :slight_smile:

How to use it? I got

I create Rule for Automation Command

And run this script

function test() {
cmd.Execute(‘Automation Show Message:Test’);
}

2 Likes

Any suggestion on this cmd.Execute('name:value'); @emre

Hey @sukasem

Lodge an issue, I think you can split your post off from the error message. I am very keen to see the answer as well.
I would maybe change your Rule Name first just in case it is a reserved word…

Don’t know how to split the topic :blush:
Have you tried it? Rule name is not issue I changed it still get error.

For some reason, at first I could not get this to work from the Test button at the bottom-right of the Script Editor.

function execAMC() {
  cmd.Execute('TestCommand:TestValue');
}

MessageToDisplay:

CN: [:AutomationCommandName]\rCV: [:CommandValue]

So I thought I would get funky and add it to the Close button …

Now when I click close button, I see this:


And the Test button also now works …

Hmm…So, if the Automation has been executed by ordinary way once before then it work?

Not sure. But I will say this: I have had issues with the Test facility before, many times, and has almost driven me over the edge when I know my script is good and it keeps throwing the same error over and over again.

It seems that it may not work until you save the script, close the Script screen, navigate somewhere else (or logout), then go back in to test it.

I have had this type of trouble when creating new scripts, or when I script has an error in it. It is like it gets “stuck in memory” and ignores changes, and I need to “reset cache” to get it to behave again. Maybe it is only committed to the DB after saving, then closing the script screen, and navigating away and back in.

1 Like

Oh well, I think I will stick with dynamic automation command name. Easy and work well :smile:

I have seen this behaviour albeit random as well. So Q - your take is it works fine? I have not tried it as yet @sukasem but I would be surprised if you had not closed down and saved the script by now and retried… :confused:

Yes, the helper method works fine.

1 Like

Sorry for the confusion if it created any. I think I forgot to mention but it should work fine on latest .61 refresh.

2 Likes

It does not only happen there either. I’ve notice it happen in all other setting areas as well. You could for example, create a new printer with a print job tab still been there, then go back to print job, click edit, and try to add the new printer or change to it, and it does not find it or add it to the list. You literally have to close all tabs relating to print job, navigate away from print job, then come back to it, just to see the changes

That’s no different to if updating an action having to remove, save, close, open, add on the rule.