INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: ShayB on September 26, 2012, 03:55:30 pm

Title: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
Post by: ShayB on September 26, 2012, 03:55:30 pm
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
Title: Re: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
Post by: MrC on September 26, 2012, 11:38:44 pm
Try [SubFolder,0].
Title: Re: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
Post by: ShayB 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
Title: Re: if(IsEmpty([SubFolder]),,\[SubFolder]) doesn't work in directories-rule
Post by: MrC 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.