Page 1 of 1

Variable %s_original_name% not working properly

Posted: Thu Mar 04, 2021 3:10 pm
by ThomasM
Hi,

I doscovered the following:

Whe I try to populate a variable to %s_original_name% the outcome is not correct in cas the name is an UUID:

Original Filename is: 12345678-1234-5678-8765-123456788765.avi
Var Archnumber set to

Code: Select all

%s_original_name%
gives: -123444458764 (obviously wrong)
Var Archnumber set to $

Code: Select all

left("%s_original_name%",36)
gives correct: 12345678-1234-5678-8765-123456788765

Trest-Workflow is attached.

Any ideas?

regards,
tom

Re: Variable %s_original_name% not working properly

Posted: Thu Mar 04, 2021 3:53 pm
by emcodem
Hey Thomas, so good to hear from you!

Congratulations, you found a Bug :D And a pretty stupid one to be honest. I guess we will take such stuff into consideration for our new and shiny automated testing suite :-)

Keep it coming, Steinar loves bugs hehe

Re: Variable %s_original_name% not working properly

Posted: Thu Mar 04, 2021 7:39 pm
by admin
Hi ThomasM,

This is not a bug but behavior as expected. What you actually have here is a mathematical expression (stored in a string) and will be treated as such. So you should quote the "%s_original_name%" variable in order to treat it as literal string. Note that this is only needed in the "Populate" and "Conditional" nodes as these are the only ones trying to evaluate the text in the input fields.

Hope this helps.

-steinar

Re: Variable %s_original_name% not working properly

Posted: Mon Mar 08, 2021 2:49 pm
by ThomasM
Moin emcodem,
Hey Steinar,

thanks for your help and for clearing things up.

regards
tom