2 Replies Latest reply on Feb 26, 2011 5:45 PM by jovenator

    Comparing properties in search criteria


      I am trying to compare two properties in a smart collection. From the documentation, its obvious how to craft the search criteria to compare a property with a fixed value but is it possible to find all photos whose value of p1 is greater than their value for p2?




        • 1. Re: Comparing properties in search criteria
          DawMatt Level 3



          If I understand this correctly, you want to know if the Smart Collection (or its SDK equivalent function) can do something like query all photos where the focal length is numerically larger than the ISO?  (I know that query makes no sense - its just an example).


          I don't believe this is possible.  As you've noted the documentation makes it clear how to query against a fiixed value but not against another field.  Experimentation in the Edit Smart Collection seems to back this up.


          The only option I can think of is for you to manually query the superset of all possibly matching photos then programatically check for and discard photos that do not match you criteria.  This is less efficient than what you were aiming for but that is the only option available right now.



          • 2. Re: Comparing properties in search criteria
            jovenator Level 1

            Thanks Matt. Thats what I was afraid of. The reason I want to do this is to define a custom SmartCollection thats updated automatically as the data changes. I'd rather not have to make the user invoke my code to walk through the photos and update them programattically. :-(