INTERACT FORUM

More => Old Versions => Media Center 11 (Development Ended) => Topic started by: ChrisRainman on March 18, 2005, 08:40:34 am

Title: IF Database expression question
Post by: ChrisRainman on March 18, 2005, 08:40:34 am
Hope that someone can help on this one:

How can I compare against empty fields in the IF database expression?

Example:

IF(ISEQUAL([Album],""),C:\Tracks,C:\Albums)

That's the way I would like to have it but seems not possible (as "" is not interpreted as empty)

Is it possible to use an IF-expression within an IF-expression? (This would be very useful if you want to have more than two decision paths).
Title: Re: IF Database expression question
Post by: Matt on March 18, 2005, 08:45:20 am
We'll add IsEmpty(...) to the next build.
Title: Re: IF Database expression question
Post by: Herakles on March 18, 2005, 12:08:02 pm
Yes, it's possible to have multiple ifs. I use this formula and it works perfectly for me:

If([Complete Album],If(IsEqual([Disc #],0,2),Complete Albums\[Album Artist (auto)]\[Album],Complete Albums\[Album Artist (auto)]\[Album]\Disc [Disc #]),If(IsEqual([Disc #],0,2),Partial Albums\[Album Artist (auto)]\[Album],Partial Albums\[Album Artist (auto)]\[Album]\Disc [Disc #]))