INTERACT FORUM

Please login or register.

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

Author Topic: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule  (Read 1490 times)

ShayB

  • Junior Woodchuck
  • **
  • Posts: 97

hi,

I just moved from media center 16 to 17.0.186

I am trying to rename my files (and relocate them) using my functions. everything worked great in MC16
and now instead of placing the file in the correct location, when [SubFolder] is empty the path is "\Unknown SubFolder"

I think that this is a bug,
please look into it
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
« Reply #1 on: September 26, 2012, 11:38:44 pm »

Try [SubFolder,0].
Logged
The opinions I express represent my own folly.

ShayB

  • Junior Woodchuck
  • **
  • Posts: 97
Re: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
« Reply #2 on: September 27, 2012, 12:34:20 am »

Try [SubFolder,0].


thanks MrC, your suggestion works
the question is why there is a change of behavior in MC17
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
« Reply #3 on: September 27, 2012, 01:02:57 am »

There were changes made when certain fields became list fields vs. simple string fields.  The old behavior was to use the actual value, but this presented problems when a field such as [Artist] is a list.

So, certain dialogs and rule areas now use the Formatted version of a field, which is designated as [field,1].  This has the side-affect of pretty-printing empty values, for example, as "Unknown field".

Using the Raw formatting of a field, [field,0], just uses the data as it stored in the field.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up