INTERACT FORUM

Please login or register.

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

Author Topic: Changing the name of a Column based on an expression ?  (Read 1255 times)

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Changing the name of a Column based on an expression ?
« on: February 20, 2013, 05:14:17 pm »

So I created an Expression Column for Playing Now:

if(isequal([filename (path)],Classical,8),[Composer],[Description])

All my classical music is under a Classical folder.

For classical music, I want a Composer column.

In order to save space in the Playing Now window, I don't want that column for all other genres.

I use the [Description] tag to describe different versions of an album, such as remasters.  I can't ever remember a remaster of a Classical album, so it seemed like a good thing to put in place of [Composer].

But the column name doesn't change.

Any way to deal with that?

Thanks !

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Re: Changing the name of a Column based on an expression ?
« Reply #1 on: February 21, 2013, 01:36:31 pm »

So, are the column names only a static string ?

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Changing the name of a Column based on an expression ?
« Reply #2 on: February 21, 2013, 01:41:06 pm »

I think so...

You might be able to do something via the Automation interface, but I'm pretty skeptical.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Changing the name of a Column based on an expression ?
« Reply #3 on: February 22, 2013, 12:57:51 am »

Column names are defined by the names of the library fields they represent.

While you can create an expression based library field, where the data contained within that field is defined by the contents of other fields relative to a particular file, the field name itself does not support expressions.

It's an interesting idea. In most cases, the column name would be simply [Varies], as the data in the column would contain different values per file, but I can see where you're coming from.

I honestly don't see this happening though. Your best approach today would be to set the columns you desire for classical music and then save them as a preset. You can then switch between column layouts in just a couple of mouse clicks.

-marko.

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Re: Changing the name of a Column based on an expression ?
« Reply #4 on: February 22, 2013, 10:55:42 am »


I honestly don't see this happening though. Your best approach today would be to set the columns you desire for classical music and then save them as a preset. You can then switch between column layouts in just a couple of mouse clicks.

Thanks for your information.

If MC18 is not going to be able to switch the columns based on the Genre, then simpler than a preset is simply to put the Classical columns in there all the time... but at the right end, and then scroll over when it is a Classical piece.

Actually I will put Composer in the visible end with Album and Artist, because it is the one crucial field for Classical.

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3125
Re: Changing the name of a Column based on an expression ?
« Reply #5 on: February 22, 2013, 04:41:45 pm »

I have two expression fields that set their values to Artist or Composer depending on the genre, then use them in the display header as appropriate. That does not solve the column header problem in the list, but at least the display header has the information that I want in the right places. You might be able to adapt this to your needs.

autosort      = if(isequal([Genre],Classical,8),[Composer],[Artist])

and

autosort1   =  if(isequal([Genre],Classical,8),[Artist],[Composer])

Then in the 2 header lines

[Autosort]  - [Name]  if(isempty([People]),,with  [People]) if(isempty([Autosort1]),,by  [Autosort1])

and

[Album]     [Elapsed Time] // [Total Time]       [PN Position] of [PN Tracks]    if(compare([Bit Depth],>,16),[Bit Depth]//formatnumber([Sample Rate],0), )   [Library] [Zone]


Actually, I have put in the Computer tag for most of my non-classical also. It is nice to know the composer, when known, for non-classical also. It saves me from comstantly saying "Oh, who did that originally", especially for things like folk music.

You can also shrink the composer column to its smallest possible value in the list when not playing classical, assuming you are not jumping back and forth a lot. You end up with 3 dots, but that can be better than a big blank field.

Logged
Pages: [1]   Go Up