INTERACT FORUM

Please login or register.

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

Author Topic: expand modifier  (Read 630 times)

DJLegba

  • Citizen of the Universe
  • *****
  • Posts: 995
expand modifier
« on: January 31, 2021, 12:14:13 pm »

The expand modifier does not work with calculated fields. I have a field named Work that I use for grouping classical compositions. The following search is close to doing what I want (a random list of works)

-[Work]=[] -[Genre]=[Cantata],[Christmas],[Opera] ~sort=Random ~expand=Work

The problem is that if I have several recordings or performances of the same piece, they're listed one after the other, and I'm not always in the mood to hear a particular string quartet 8 times in a row. To overcome this I created a calculated field named WorkArtist that is empty if the Work tag is empty, but Work - Artist otherwise:

If(IsEmpty([Work]),,[Work] - [Artist])

(have to thank beautiful Zelda from Galaxy 9 for help on that one)

However, when I change ~expand=Work to ~expand=WorkArtist in my search, I get my entire library.

I searched the forum and there is evidence this would have worked at some point. See
https://yabb.jriver.com/interact/index.php/topic,128095.msg888705.html#msg888705 (although I also found another thread by HaWi who clearly states it wasn't working for him).

I'm using 27.0.43 64-bit
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: expand modifier
« Reply #1 on: February 01, 2021, 01:48:42 pm »

Could you send a library backup to matt at jriver along with instructions about how to show this view?  Looking at the code it seems like it should work.  Thanks.
Logged
Matt Ashland, JRiver Media Center

DJLegba

  • Citizen of the Universe
  • *****
  • Posts: 995
Re: expand modifier
« Reply #2 on: February 01, 2021, 06:00:00 pm »

Thanks. Library backup and description sent.
Logged

DJLegba

  • Citizen of the Universe
  • *****
  • Posts: 995
Re: expand modifier
« Reply #3 on: February 02, 2021, 09:01:15 am »

Operator error. Matt pointed out I had mistakenly named my field "Work, Artist", which I didn't notice because the display name was "WorkArtist". I deleted the field and added it back as WorkArtist, and now it works with expand. I would like to claim I know better than to put a comma in a field name, but I certainly did it. I must have thought I was defining the field at that point.

Thanks Matt
Logged
Pages: [1]   Go Up