Email Notification on Conditional Rejection

Questions and answers on how to get the most out of FFAStrans
Post Reply
Ian_Grey
Posts: 6
Joined: Fri Dec 02, 2016 8:19 pm

Email Notification on Conditional Rejection

Post 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?
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Email Notification on Conditional Rejection

Post 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...
emcodem, wrapping since 2009 you got the rhyme?
Ian_Grey
Posts: 6
Joined: Fri Dec 02, 2016 8:19 pm

Re: Email Notification on Conditional Rejection

Post 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
emcodem
Posts: 1749
Joined: Wed Sep 19, 2018 8:11 am

Re: Email Notification on Conditional Rejection

Post 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 :D
emcodem_ternary_operator.json
(3.35 KiB) Downloaded 211 times
emcodem, wrapping since 2009 you got the rhyme?
Post Reply