Display Single/Multiple Artists Expression

From wiki.jriver.com
Jump to navigation Jump to search

What this does is create a column in a view scheme which gives you an artist if the track(s) are on a single-artist album, and gives you an album if the track(s) are on a compilation. It can really cut down the number of entries in a column, depending on the number of compilations you have. In my case by almost 1000!

If you invert the [artist]/[album] fields, it will do the opposite. I find them a great replacement for standard Artist and Album columns.

Anyway, first off, here's an image:

Artistalbum.jpg

You can see a compilation title and an artist title highlighted, and in the third column you get the artists on the compilation and the albums by the artist in the previous column.

I know you can set up view schemes with Album Type to filter your compilations out etc, but I find it helpful because I use a lot of View Schemes with 7 or 8 View Items, so trimming them down is always good. It also trims the number of entries in the second column by around half for me (from 2100 artists to 1050 artist/album entries), which is great when I'm going through the whole collection...


Step by step instructions:

1. In Edit View Scheme, Add new View Item>Type: Expression.

2. Name it "Artist/Album" and paste the following into the Expression field:

If(IsEmpty([artist]), none, If(IsEqual(Mid([album type]), S), [artist], [album])

3. Hit OK.

4. Repeat steps 1 to 3, using "Album/Artist" for the name, and paste the following instead:

If(IsEmpty([album]), none, If(IsEqual(Mid([album type]), M), [artist], [album])




If you found the above useful, here are 2 more that are helpful with thm:

AR/AL Rating (Artist/Album Rating)

You have to create the Artist Rating and Album Rating fields for this to work.

If(IsEmpty([artist rating]), !,  If(IsEmpty([album rating]), !,  If(IsEqual(Mid([album type]), S), [artist rating],
[album rating])

Note; if you copy and paste this you'll probably get line-breaks, which is no good for the Expression Evaluator, so paste it into Notepad and get rid of any line-breaks.

Initial

Returns first letter of album or artist (after 'the' or 'a')

If(IsEmpty([artist]), none, If(IsEqual(Mid([album type]), S), If(IsEqual(Mid([Artist],0,4),The ), Mid([artist],4),
If(IsEqual(Mid([Artist],0,2),A ), Mid([artist],2), Mid([artist]))), If(IsEqual(Mid([Album],0,4),The ),
Mid([Album],4), If(IsEqual(Mid([Album],0,2),A ), Mid([Album],2), Mid([Album])))))

Note; if you copy and paste this you'll probably get line-breaks, which is no good for the Expression Evaluator, so paste it into Notepad and get rid of any line-breaks.


Thanks EpF.