03-24-2015 09:20 AM - edited 03-01-2019 09:14 AM
I have set up an email event to trigger a Job action that is supposed to pass email variables to a job. For some reason, I can only pass 1 variable through the job action Parameters Override section.... ie <email.subject> or <email.message>. If I try to put more than one, it bombs out. I have tried a space, comma, carriage return, quotes, etc... At this point, I would like to see if it is even possible to do this or if I have to try a different technique.
03-24-2015 02:27 PM
Hi Edward,
This all depends on data type and how many arguments your script/exe is set up to receive. Can you please verify how this is set up?
Thanks,
Derrick Au
03-24-2015 03:33 PM
Email event --> Job Action with override parameters to launch job, which launches script below and prints to echo.txt for testing. It will give me %1, but never %2. Here is the cmd....
echo off
SET Number1=%1
SET Number2=%2
echo %Number1% >c:\active\echo.txt
echo %Number2% >>c:\active\echo.txt
:exit
03-24-2015 05:44 PM
For testing, can you just echo %1, echo %2 in the script and see if the joboutput shows the values ? Does it still only display the value of %1 ?
03-26-2015 02:26 PM
Did what you said above. Still only echo of %1. Override output below:
"test 5" "<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Test 6<i><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:gray"><o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>"
03-27-2015 02:21 PM
Hi Edward,
I ran the script above with the parameters you sent. The first argument is just text without html tags, test 5 so this gets echo correctly and directed to echo.txt. The second argument, however, is the culprit. This message body contains a plethora of html tags, angled brackets, and quotation marks--it's no wonder why the script would error out. Most common error for this type of problem is the syntax of the command is incorrect, or < was unexpected at this time. If you would like to see for yourself, then try running it from the DOS shell. Is it possible for you to use plain ASCII text as an alternative?
03-27-2015 02:47 PM
This is totally possible however you have to set up what you want correctly
if you are using Tidal 5.3.1 which is what it looks like
I tested this out and it works... you may encounter problems with Number of Characters or something
Let us know how it turns out
Marc
Marc
03-25-2015 09:04 AM
Hi Edward,
Add the quotes around the variables in the Parameters section
"<Email.Subject>" "<Email.Message>"
In your script, let's remove intermediate variables, and strip quotes
echo %1 %2
echo %~1 > C:\active\echo.txt
echo %~2 >> C:\active\echo.txt
BR,
Derrick Au
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide