Page 1 of 1

Binding excception when imdbid doesn't exist

Posted: 31 Jul 2014, 20:29
by boulogne75
Hi,
First of all, congrats for this great piece of software.
I want to use something like this in a more complex expression to rename movies: {imdbid ? imdbid : y}
What I finally want to achieve is:
if (imdbdid exists) {imdbid} else {y}
or better
if (imdbdid exists) {imdbid} else if (y exists) {y} else {'unknown'}

The problem is I get a binding exception when no imdbid exists and the whole expression is bypassed.
That's not really a problem for movies as 99.99% are in IMDB but it is for concerts :(

Thanks in advance for pointing me in the right direction.

Re: Binding excception when imdbid doesn't exist

Posted: 01 Aug 2014, 10:19
by rednoah
There's a helper function for that:

Code: Select all

{any{imdbid}{year}}

Re: Binding excception when imdbid doesn't exist

Posted: 01 Aug 2014, 19:20
by boulogne75
Works great.
I saw through the forum {allOf{x}{y}}, etc... but completely missed that one.
Thanks for the pointer.