INTERACT FORUM

Please login or register.

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

Author Topic: [21.0.83] Using a search modifier in an expression string  (Read 2445 times)

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
[21.0.83] Using a search modifier in an expression string
« on: June 14, 2016, 11:53:22 pm »

Code: [Select]
If(IsEqual([Disc #],1,5),Yes,No~a)
Can that be translated so that the ~a would be honoured as if this were a search query instead of simply appearing literally as "No~a"?

Background

This is the theoretical calculated data for a custom field: [Disc Negator]. This field is designed primarily to be referenced in Rename, Move & Copy Files, and has two options: Yes and No. If a given album has only one disc, then I will mark that field "Yes". What this will do is prevent Rename, Move & Copy Files from creating an additional directory:

Code: [Select]
Delimit([Disc #],,/Disc/ )
Naturally, for multi-disc albums, that directory will be created.

I am looking to expand [Disc Negator] so that it can do more than just that, but I need for that search modifier (or equivalent) to be useable in this manner.

Any thoughts?

Logged

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: [21.0.86] Using a search modifier in an expression string
« Reply #1 on: June 15, 2016, 12:05:04 am »

What's the end goal?  

albums with only one disc should have [disc #] empty which drastically simplifies this

RMC has to be limited in certain ways, so search modifiers are not possible.  A smartlist can combine these though in some ways
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: [21.0.86] Using a search modifier in an expression string
« Reply #2 on: June 15, 2016, 08:42:46 am »

You can test [Disc #] right in your Rename, Move, and Copy expression for Directory.  Here's an example taken from the Wiki entry on RM&C:

\Music\[Artist]\[Album]\if(isempty([Disc #],1),,[Disc #])

That makes a Disc # directory if it exists.  If it doesn't, then no Disc directory is produced.

http://wiki.jriver.com/index.php/Directories_Template

If you erroneously have albums with only 1 disc where Disc # is set, we can help you find those and remove the disc number from them.

Brian.
Logged

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: [21.0.86] Using a search modifier in an expression string
« Reply #3 on: June 15, 2016, 10:52:06 am »

Hmm...based on what you guys have said, and thinking about how I have this set up, I might have a way or two to get what I'm after. I know I consciously made the decision to fill [Disc #] even for albums with only one disc due to some technical issue I was having at the time, but I can't remember precisely what that was.

I'll play with it when I get home today and get back to you.
Logged
Pages: [1]   Go Up