4 Replies Latest reply on Sep 11, 2018 9:19 PM by brendanbell

    AFEventFrameSearch Child with no Parents

    brendanbell

      Trying to construct a query that will return Event Frames that have no parents for a particular Element.

      I have a feeling that I could probably do this with a nested query under the Parent Object?

      I am using AF SDK 2.10

       

      string query = @"Element:'TestElement' Category:'MyCategory' Start:>='*-1y' Parent:{???}";
      AFEventFrameSearch afs = new AFEventFrameSearch(afd, "test", query);
      

       

      Any guidance?

        • Re: AFEventFrameSearch Child with no Parents
          Rick Davin

          Hi Brendan,

           

          Buried in the very long (and somewhat intimidating) Search Overview page is this line:

           

          An empty string value should be used when searching for objects with a null value for the specified filter. For example, to find all objects without a template defined use Template:'' in the query.

           

          This suggests you could use:      Parent:''

           

          However, since an event frame without a parent would be at the topmost level of the database, and you don't want to consider any child event frames, you could alternatively use this filter instead of Parent:      AllDescendants:False

           

          I have no numbers to suggest one is better than the other, so if you are willing to test it out and get back to us, I would be most grateful.  If they performed the same, I would stick with the Parent filter since it clearly shows your intent.