INTERACT FORUM

Please login or register.

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

Author Topic: Smartlist not returning results as expected  (Read 2216 times)

andori

  • Recent member
  • *
  • Posts: 14
Smartlist not returning results as expected
« on: July 05, 2016, 05:00:41 pm »

I am probably missing something obvious, but I can't figure out why a smartlist will not return the results I am expecting.

I use MC21 to manage around 23K photos and I use Rename, Move & Copy Files to make the filename: [Date (filename friendly)]-[name]
This ensures the photos sort correctly when exporting photos.

I am trying to create a smartlist that will only show the photos whose filename does not conform to this naming convention.  I have set the rules as shown in the "Smartlist Rules" attachment.  The smartlist is including all of my photos instead of only the ones that that do not conform.

To make sure the expression was evaluating the way I was expecting, I added both the "Filename (name)" column and an expression column titled "New Filename" to the view so I can see both values side-by-side.  (The "Expression Rules" attachment shows the rules for the "New Filename" column.)  As the "List View" attachment shows, the values are the same for these two columns, therefore I would expect the photos not to show up in the smartlist.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Smartlist not returning results as expected
« Reply #1 on: July 05, 2016, 05:28:40 pm »

I do something similar for a different application, but it should work for you.  But first, why doesn't your smartlist work?  I'm guessing that the smartlist wizard isn't translating the part after "is not" correctly.  I.E., it's not doing the proper comparison, because the expression isn't being interpreted right.

Doing some testing, I'm pretty sure that the smartlist definition you've written just won't work at all.  It has to be written in a funky way sort of like this:

Code: [Select]
[=isequal([Album],[Artist])]=1
That would go on a "custom" line.  That particular expression is testing to see if [Album] and [Artist] are the same.  I did that because I knew I'd get a few matches in my library that way.  You could *probably* put your test criteria inside the ifequal() clause, but I haven't tested it, so I'm not sure.

In any case here's what I did:

In one of my views, I made a new column called "different".  This column tests to see if the filename and my chosen expression are different.  If they are, it outputs "Yes".  If they are the same, it outputs "No".  After adding this column and verifying that it was right, I just clicked on the column to sort by it, which brought all of the Yes values to the top.  Voila', I have a list of everything that's not named correctly.

The contents of my "different" column are pretty simple.  For your application it would look like this:

Code: [Select]
if(isequal(filename(,0),[Date (filename friendly)]-[Name]),No,Yes)
Thinking about it, it might make more sense to name this column something like "Needs Rename".

I like the expression column version of this better because it doesn't require any funky syntax (that I struggle to remember every time) and because it's very immediate and easy to work with:  refine, test, refine, test, etc.  Plus the column can be in a view you work with routinely, so it's obvious if the file name is proper or not.  Expression column are a great feature of MC.

I'm sure that's way too much info.  Good luck.

Brian.
Logged

andori

  • Recent member
  • *
  • Posts: 14
Re: Smartlist not returning results as expected
« Reply #2 on: July 05, 2016, 06:51:23 pm »

Thanks for the help Brian!  The "Needs Rename" code you provided worked perfectly and I was able to sort and bring the "Yes" records to the top.  Using the code, I tweaked my smartlist rule as follows and it is working as expected.

Code: [Select]
[Media Type]=[Image] -[=isequal(filename(,0),[Date (filename friendly)]-[Name])]=1
--Andy
Logged
Pages: [1]   Go Up