Exists function with User Variables - is it possible?

Questions and answers on how to get the most out of FFAStrans
Post Reply
gdpodesta
Posts: 33
Joined: Tue Mar 26, 2019 6:11 pm

Exists function with User Variables - is it possible?

Post by gdpodesta » Sun Feb 09, 2020 5:08 pm

We want to conditionally prepend a disclaimer to a video, and to accomplish that, we generate a png file before the FFAStrans job begins.
The Insert Media works as expected, but I'm unable to get a simple conditional to recognize if the disclaimer file exists or not.
To test this and get it working, I've set up this workflow.
  • Populate variables, mimicking the API submission of the job
  • Test if the Disclaimer file exists or not
  • If NOT found, write a text file "NOTFOUND.txt"
  • If found, write a text file "FOUND.txt
i copied/pasted the conditional from the help text, and am certain the file does NOT exist, yet the only process that it continues on to is the result of a successful test - it never takes the failed test path. Is there something blatantly wrong with any of these nodes that I'm somehow missing?
2-9-2020 8-44-17 AM.jpg
2-9-2020 8-44-17 AM.jpg (97.84 KiB) Viewed 347 times

momocampo
Posts: 427
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Exists function with User Variables - is it possible?

Post by momocampo » Sun Feb 09, 2020 6:24 pm

Hello gdpodesta,

Very productive right now :) That's great!
Anyway, you forgot the quotes inside your exists function.
must be :
$exists("%s_disclamer_png%")

Try with quotes and it will be ok ;)

Cheers.

Benjamin

gdpodesta
Posts: 33
Joined: Tue Mar 26, 2019 6:11 pm

Re: Exists function with User Variables - is it possible?

Post by gdpodesta » Tue Feb 11, 2020 2:06 pm

Don't you hate when fresh eyes are right? lol. Thanks!

momocampo
Posts: 427
Joined: Thu Jun 08, 2017 12:36 pm
Location: France-Paris

Re: Exists function with User Variables - is it possible?

Post by momocampo » Tue Feb 11, 2020 2:33 pm

Hehe !
Fresh eyes are often right, true :)
Glad I helped you.

Cheers.

Benjamin

Post Reply