Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Is there a way to specify multiple "or" conditions in $if(cond,then,else) ? (Read 1404 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Is there a way to specify multiple "or" conditions in $if(cond,then,else) ?

I have a "Lyrics" column that I want to show "Y" if the song has embedded lyrics, and nothing if it does not.  This does that for %UNSYNCED LYRICS%:

$if(%UNSYNCED LYRICS%,Y,)

However, I would like to include %lyrics% in as an "or" with %UNSYNCED LYRICS%, so that FLAC/OGG Vorbis comments are included--in other words, show "Y" if either condition exists, nothing if not.  The closest I've come is this:

$if3(%UNSYNCED LYRICS%,%lyrics%,)

But it only shows a hard-to-see "." if a match is made, and I can't seem to make that show as "Y" instead, as was easy to do in the first example with just one condition.  Is this possible to do, or do I have to settle for the "dot" on the either/or match?

Re: Is there a way to specify multiple "or" conditions in $if(cond,then,else) ?

Reply #1
I don't use or that often but try this:
Code: [Select]
$if($or(%UNSYNCED LYRICS%,%lyrics%),Y,)

 

Re: Is there a way to specify multiple "or" conditions in $if(cond,then,else) ?

Reply #2
I don't use or that often but try this:
Code: [Select]
$if($or(%UNSYNCED LYRICS%,%lyrics%),Y,)
jazzthieve, YOU DA MAN, thank you for this!  Works perfect!