Important Notice: On February 29th, this community will be put into read-only mode. All existing posts will remain but customers will be unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Creating a Dynamic collection with multiple and AND / OR statements

This is more of a training exercise of "How can it be done?" than a problem. The AND plus OR is simple enough for me. When I start combing multiple AND / OR statements in one collection, in a single collection I frequently run into issues.

Call this key1

Call this Key2

I have 2 dynamic collections that tell me:

  • Dynamic Collection “A” = “Key1 exists, AND Key2 does not”
  • Dynamic Collectioon “B” = “Key2 exists, AND Key1 does not”

I want to combine these into one dynamic collection, called “C”

  • Dynamic Collection “C” = “Key1 exists, AND Key2 does not” OR “Key2 exists, AND Key1 does not”

I have Dynamic collection A and B, and they are sufficient for my needs.  I am trying to create Collection C as a training exercise to further my understanding of collections filters. So far, I can’t seem to get it correct.



Date Votes
  • Bruce. can you share the filters for those 2 collections?

  • Bruce,

    One way to accomplish this would be to use collection membership conditions instead of looking directly at the reg values, e.g:


    -- Computer > Collection > Is Member > Dynamic Collection A

    -- Computer > Collection > Is Member > Dynamic Collection B

    This would not be an exclusive or, however. It would include computers that are a member of one or both dynamic collections. If you want to only include computers that are a member of exactly one dynamic collection things would get more complicated. If you want more detailed help with this then I agree with James, it would be helpful to see your exact filters so we can better understand what you are doing and provide specific suggestions and examples.

  • Luke - yes, that is one way. One of a few simple, different, ways, and I have already implemented one that uses 2 different collections.. I wanted to do just  one Dynamic collection if I could figure it out, again more of a intellectual training exercise. than a need.

  • James D. Currently I have one filter that tells me if  both registry entries are present for computers that have this software package installed (screen shot below). If only one is present, it will not appear in this list.

    I have second collection that shows me computers that have this software package, and do not appear in the collection mentioned above.  That is perfectly fine, and is sufficient for what  I need.   I have had a few instances in the past where something like this could have been handy, so I anted to see if I could figure it out just to help further my understanding of collection filters and manipulating them

  • If I'm reading this right, at the end of a long day, your collection is using group filters so that ALL filter requirements must equal to TRUE otherwise a computer won't show up. If you change the 2nd filter from ALL to ANY, I believe it will show you any computers that have either registry key with a blank value. This means that either Registry value defined by filters 3 & 4 can exist on the computer and both are not required.

    Each registries group filter, filters 3 and 4, require ALL filters for those registries to equal true. Filter 2 requires that both filters 3 & 4 equal True. If either filter 3 or 4 is False, Filter 2 reports False and won't show that computer.

    This won't fine tune to tell you which Registry key is present or missing though, you would need separate collections for that like Luke recommended. 


Please sign in to leave a comment.

Didn't find what you were looking for?

New post