Inventory, collection based on membership in many collections not working

Comments

6 comments

  • Bouma, Colby

    Interesting. I can replicate your results. This returns 0 computers:

    However, adding extra filters fixes it:

    This correctly returns only the computers that are members of both collections.

    1
    Comment actions Permalink
  • Skuli Franz Hjaltason

    Very nice, thank you for this workaround.

    I can now proceed with the project but hope AA will look at this.

    0
    Comment actions Permalink
  • Bouma, Colby

    I'm not sure it's a bug. I think it's just a quirk of the way filters work. I believe it's doing a database query for every filter. What you are doing requires a database join, so you need to do 2 separate queries to be able to join anything. I'm just guessing though :)

    0
    Comment actions Permalink
  • Skuli Franz Hjaltason

    Yes, could be :)

    Thanks again for the help, I never would have tried this :)

    0
    Comment actions Permalink
  • Shane Corellian

    Thanks, Colby.

    This is due to the nature of SQL. The two tables used represent a one to many relationship. This is similar to the Computers and Applications tables. One computer can have many applications this is why you would need to perform the same breakdown if you were looking for a computer that had two or more specific applications. The original collection would never return any computers because at the filter level SQL was trying to see if each computer was a member of a collection that was called both 7-Zip AND Adobe Flash. When you separate the two similar filters into different group filters then you can get what you are looking for.

    We are discussing some ways that we can make this a little more intuitive. Sorry for the confusion.

    0
    Comment actions Permalink
  • Skuli Franz Hjaltason

    When put in context with one to many relationships and the other tables, it is totally making sense, thanks Shane and Colby.

    0
    Comment actions Permalink

Please sign in to leave a comment.