INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Help with custom expression / view  (Read 1165 times)

Benson98

  • Recent member
  • *
  • Posts: 20
Help with custom expression / view
« on: April 09, 2012, 09:43:58 pm »



Hello,

Can I please get some help with settting up a custom view?

I'm trying to set up a view that has my cds separated into groups by Artist (CDs, Soundtracks, Singles, Various etc).  So far so good.  But the final step that I am stuck on is to have it show the full albums separatley and to show the ones that would only have one or two songs grouped together as one.


An example would be:

(Artist) Bob Seger - (Group) Cds - (Album) Tracks are grouped by their album title.
(Artist) Bob Seger - (Group) Soundtracks - (Album) All tracks are grouped together as one Soundtrack. 

Is it possible using an expression on the Album field so that if it contains various or soundtrack (Genre or custom field) to group the tracks together as one, otherwise have them listed by their album title?


Thanks,

-Benson98
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Help with custom expression / view
« Reply #1 on: April 09, 2012, 10:42:25 pm »

Is this a categories or panes view?
Logged
The opinions I express represent my own folly.

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: Help with custom expression / view
« Reply #2 on: April 10, 2012, 01:01:39 am »

Is it possible using an expression on the Album field so that if it contains various or soundtrack (Genre or custom field) to group the tracks together as one, otherwise have them listed by their album title?

Yes. The following expression illustrates how this might be done...

Code: [Select]
[Artist] •
If(IsEqual([a.Class], Live), Live Albums,
If(IsEqual([a.Class], Soundtrack), Soundtracks,
If(IsEqual([Album Type], Single artist /(complete/)), [Released] • [Album],
If(IsEqual([Album Type], incomplete, 8), Incomplete Albums,
Multiple Artist Albums
)))

Save this (actually, something like this that works with your library) as an expression field. Then, in the tab drop-down menu, select that as the field to Group By. In my library, this first lists an artists regular albums by release date, followed by groups of tracks from incomplete, live, multiple artist and soundtrack albums.
Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: Help with custom expression / view
« Reply #3 on: April 10, 2012, 09:36:51 am »

Take a look at the pics below. I have mine set up a little differently but I think this is what you want.






If this is what you're looking for, here's what you should do.

First, create a new Field and call it what you want.
Enter the following in the expression area.

Code: [Select]
If(IsEmpty([Group]),/[unknown/],[Group])\If(IsEmpty([Album]),/[unknown/],[Album])&datatype=[list]

Create a new Library View.
Have 3 panes

1. Artist
check grouping
2. Artist
3. the new field you created

If you want the Artist in the tree use this

Code: [Select]
If(IsEmpty([Artist]),/[unknown/],[Artist])\If(IsEmpty([Group]),/[unknown/],[Group])\If(IsEmpty([Album]),/[unknown/],[Album])&datatype=[list]
Logged

Benson98

  • Recent member
  • *
  • Posts: 20
Re: Help with custom expression / view
« Reply #4 on: April 10, 2012, 09:18:49 pm »


Thanks for the help guys.

The expression from Rick worked great.

This is what I am using in Theater View.

Artist (List of Artists)
Group (Albums, Singles, Soundtracks etc)
Expression:
If(IsEqual([a.Class], Live), Live Albums,
If(IsEqual([a.Class], Soundtrack), Soundtracks,
If(IsEqual([Album Type], Single artist /(complete/)), [Album],
If(IsEqual([Album Type], incomplete, 8), Incomplete Albums,
Multiple Artist Albums
)))


Thanks,

-Benson98
Logged
Pages: [1]   Go Up