Binding excception when imdbid doesn't exist

Any questions? Need some help?
Post Reply
boulogne75
Donor
Posts: 2
Joined: 31 Jul 2014, 20:11

Binding excception when imdbid doesn't exist

Post 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.
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Binding excception when imdbid doesn't exist

Post by rednoah »

There's a helper function for that:

Code: Select all

{any{imdbid}{year}}
:idea: Please read the FAQ and How to Request Help.
boulogne75
Donor
Posts: 2
Joined: 31 Jul 2014, 20:11

Re: Binding excception when imdbid doesn't exist

Post by boulogne75 »

Works great.
I saw through the forum {allOf{x}{y}}, etc... but completely missed that one.
Thanks for the pointer.
Post Reply