I am experimenting the PAD Scripts. I got the "Run VBScript" to work, now trying the "Run JavaScript" action.
I expected the statement: console.log("Text Here") to populate the return variable "JavascriptOutput", but it thru an exception. Based upon a response from another user, I tried using "WScript.echo("Text Here") and it worked.
From what I have read, 'WScript" is can be used in JScript or VBScript, but the description says "Run JavaScript". I don't know if this is an error or what. I am an experienced reactive web developer, so I would like to be able to leverage JavaScript when possible.
Thanks. I am excited by the potential of PAD, it could be another game changer.
Solved! Go to Solution.
As you already figured out yourself, the runtime understands JScript, which is a ECMAscript based dialect from Microsoft. Console.log isn't part of the original spec, that's why it doesn't work.
You could run your JavaScript code within a browser of your choice with:
As you already figured out yourself, the runtime understands JScript, which is a ECMAscript based dialect from Microsoft. Console.log isn't part of the original spec, that's why it doesn't work.
You could run your JavaScript code within a browser of your choice with:
A caution I just discovered with javascript outputting a variable from WScript.echo: this will append a CRLF to the end, and so when I was trying to concatenate strings into a filename box with the variable, it was sending an enter to the dialogue and exiting it. Was more difficult to find than I would have liked.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.