Page 1 of 1
Email Notification on Conditional Rejection
Posted: Tue Nov 30, 2021 8:20 pm
by Ian_Grey
Hi,
I have a workflow set up to check the frame rate and aspect ratio of an incoming file and if one of them doesn't match what I expect it rejects the file and emails that it was rejection which is all working great.
But is there a way to put in the body of the email which condition it failed, i.e was it frame rate or aspect ratio or both?
Re: Email Notification on Conditional Rejection
Posted: Tue Nov 30, 2021 9:39 pm
by emcodem
Hey Ian,
Good to See you again here, have you been successful Sending your Email pdf last time?
There are multiple ways to get to your goal, most simple would probably be to just use 2 conditionals and 2 Emails accordingly. Another one is to just write the wanted values and the actual values into the Email so the User can see which one is wrong.
Yet another one is to use a populate processor before the Mail that constructs the message you like. I use ternary Syntax for that, you want some example workflow?
I guess the last method only makes sense if you expect to need to Do more than the 2 checks...
Re: Email Notification on Conditional Rejection
Posted: Thu Dec 16, 2021 10:15 am
by Ian_Grey
I ended up doing as you suggested and put together an email that stated what the variable should be and what it actually was and listed all the variables checked.
But would love a ternary syntax example.if you have one available
Re: Email Notification on Conditional Rejection
Posted: Thu Dec 16, 2021 12:06 pm
by emcodem
Ah thats good to know.
Well i have now a ternary example.
It works like left side of ? is the IF condition what to check for, right side we have two choices separated by :
Left side of the : happens when the condition returned true, right side when the condition returned false.
Example:
Code: Select all
%f_duration% = 10 ? "%s_email_body%" : "%s_email_body%Duration less than 10 seconds<br/>"
Expression (IF condition): %f_duration% = 10
Left side of ":" (so what happens when expression is true): %s_email_body%
Right side of ":" : "%s_email_body%Duration less than 10 seconds<br/>"
Then as we always want to "append" to the variable "%s_email_body%, we set it to whatever it is now on the left side, so when the condition failed. But when the condition matches, we set it to itself plus some text we want to add.
Let me know if that's unterstandable