INTERACT FORUM

Please login or register.

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

Author Topic: A Custom View Expressions Assistance  (Read 1558 times)

Endeavor

  • Recent member
  • *
  • Posts: 9
A Custom View Expressions Assistance
« on: February 26, 2018, 05:53:21 pm »

Hello,
I am attempting to create a custom view which initially groups artists (names) by alphabet (A, B, etc...) showing, on roll up, "Artists" whose names begin with the selected letter category. Again on roll up, selecting "Albums" on an artist shows the artists' albums.
The custom view combines the categories "ArtistG," "Artists," and "Albums." These categories I have defined as user fields, with expressions. These expressions are:

"ArtistsG" =  if(isequal([album artist (auto)],/(multiple,8),/(various),if(isequal(mid([album artist (auto)],0,3),the,1),mid([album artist (auto)],4,1),if(isequal(Mid([album artist (auto)],0,1),1,6),0 - 9,Mid([album artist (auto)],0,1)))

"Artists" = if(isequal([album artist (auto)],/(multiple,8),/(various),[album artist (auto)])

"Albums" = if(isempty([album]),,[album])

The custom view works, but there a couple of artifacts that belie my inexperience with expressions. For example, the primary alphabetical groups show 0,A, 0,B, 0,C, etc.  Also, the artists under each alphabet letter are showing 0, Bob Dylan), or 0, Van Morrison).

If someone is so inclined, I could use a bit of help cleaning the expressions.

Thanks, Ron
Logged

~OHM~

  • Citizen of the Universe
  • *****
  • Posts: 1825
  • "I Don't Play The Music The Music Plays Me"
Re: A Custom View Expressions Assistance
« Reply #1 on: February 26, 2018, 07:15:15 pm »

what is "on roll up"
Logged
“I've Reached A Turning Point In My Life. I Now Realize I Have More Yesterdays Then Tomorrows”

Endeavor

  • Recent member
  • *
  • Posts: 9
Re: A Custom View Expressions Assistance
« Reply #2 on: February 26, 2018, 08:47:02 pm »

Roll Up is really a mouse over. E.g. In this case, mouse over letter "B," choose "Artists"  = list (thumbs) of artists with B name. Mouse over one of the artists, select "Albums" = list of the artists' albums.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9139
Re: A Custom View Expressions Assistance
« Reply #3 on: February 26, 2018, 11:55:45 pm »

This is just a parenthesis issue... a cursory glance suggests that your 'escapes' are misplaced. We'll do Artists first as it's simpler...

"Artists" = if(isequal([album artist (auto)],/(multiple,8),/(various),[album artist (auto)])

You're checking Album Artist (Auto) for "Multiple", so just remove all parenthesis here to remove complexity...
Code: [Select]
if(isequal([album artist (auto)],multiple,8),/(various/),[album artist (auto)])
and "ArtistsG" with similar clean up, was missing a closing parenthesis at the end...
Code: [Select]
if(isequal([album artist (auto)],multiple,8),/(various/),if(isequal(mid([album artist (auto)],0,3),the,1),mid([album artist (auto)],4,1),if(isequal(Mid([album artist (auto)],0,1),1,6),0 - 9,Mid([album artist (auto)],0,1))))
Are these better for you now?

-marko

~OHM~

  • Citizen of the Universe
  • *****
  • Posts: 1825
  • "I Don't Play The Music The Music Plays Me"
Re: A Custom View Expressions Assistance
« Reply #4 on: February 26, 2018, 11:56:15 pm »

i c...is that a british term?
Logged
“I've Reached A Turning Point In My Life. I Now Realize I Have More Yesterdays Then Tomorrows”

Endeavor

  • Recent member
  • *
  • Posts: 9
Re: A Custom View Expressions Assistance
« Reply #5 on: February 27, 2018, 09:43:41 am »

Marko,

Thank you for your comments; particularly the focus on the escapes. Also, I completely missed the last closing parenthesis in the "ArtistsG" expression.

And, yes, the view works perfectly now. +1 ;D

Cheers, Ron
Logged
Pages: [1]   Go Up