Author Topic: Formula help (please)!  (Read 2185 times)

Sheamus

  • Jr. Member
  • **
  • Posts: 81
I've been trying to create a virtual tag without success, so was hoping that one of the much more knowledgeable people may be able to help me! Basically i'm looking to set up an IF ELSE function for a new virtual tag.
What I want is a way to sort my albums by year, but with the option to sort by a custom tag <release year> in the case of compilations, archival releases etc. That is, if a compilation album is released on 2014-06-01, I want to put that in <release year> while filling the standard year tag with the original year of the various songs 1963, 1964 etc. So even though I might have an album of songs from the 60s, it will show up in my album view among the 2014 releases, instead of, as now back among the actual 1960s releases.

This is what I want my formula to do. I'm calling my virtual tag Year Released:

Year Released:     IF <Release Year> is null, show <year> ELSE show <Release Year>

I have tried to write a couple of formulas on my own using $If and $IsNull but to be perfectly honest I'm never entirely sure how the syntax works, so I usually become unstuck.

Hope someone can help! Thanks.

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3830
  • MB Version: 3.6.8830 P
Code
$IsNull(<Release Year>,<Year>,<Release Year>)

should do that for you
MusicBee and my library - Making bee-utiful music together