Author Topic: How to use $And in a formula?  (Read 1303 times)

hiccup

  • Hero Member
  • *****
  • Posts: 9172
It should be possible to evaluate more than one criteria in a formula.
An example from the wiki:

$If($And(Criteria 1,Criteria 2),True Result,False Result)

But I can't get it to work.
For example when I would want to check if a Title contains both the letter 'a' and the letter 'b', that would translate to:

$If($And($Contains(<Title>,a),$Contains(<Title>,b)),yes,no)

But that formula is not excepted. (cannot be parsed)

I suspect this might have to do with "$Contains" usually needing an "=T" or "=F", but I can't figure out how to solve it here....

Bee-liever

  • Member
  • Hero Member
  • *****
  • Posts: 3879
  • MB Version: 3.6.9318P
Wouldn't you just need to change it to

$If($And($Contains(<Title>,a)=T,$Contains(<Title>,b)=T),yes,no)
MusicBee and my library - Making bee-utiful music together

hiccup

  • Hero Member
  • *****
  • Posts: 9172
Wouldn't you just need to change it to

$If($And($Contains(<Title>,a)=T,$Contains(<Title>,b)=T),yes,no)

I would swear I had also tried exactly that, but failed.
I now copied an pasted yours, and it works, so I must have had some stupid typo.

thnx Bee-liever!