WHERE IN Clause does not support “NOT IN”?
-
I am attempting to select all items that do not have a selected taxonomy but there appears to not be a way to do this?
I have a pod for members of committees. All people are members of a committee but some of them are executive members of those committees.
I have the pod associated with a taxonomy “Advisory Committees”, and I have a field in the pod named exec_for(linked relationship field /w multiselect enabled to the same advisory committee taxonomy), where I select if they are a member of the advisory committee or not.
This works
[pods name="member" template="Executive Members" WHERE="exec_for.slug IN( 'business-management' ) AND advisory_committee.slug='business-management'"]
It will pull all members who are both members of business-management and also selected as executive members of business-management.
If I attempt to pull a list of people who are members of business-management but NOT a an executive member, it does not pull any data.
I’ve tried…
[pods name="member" template="MembersTable" WHERE="advisory_committee.slug='business-management' AND exec_for.slug != 'business-management' "]
[pods name="member" template="MembersTable" WHERE="advisory_committee.slug='business-management' AND exec_for.slug NOT IN ('business-management') "]
[pods name="member" template="MembersTable" WHERE="advisory_committee.slug IN('business-management') AND exec_for.slug NOT IN ('business-management') "]
and
[pods name="member" template="MembersTable" WHERE="advisory_committee.slug='business-management' AND exec_for.slug <> 'business-management' "]
None of these work, in fact <> fails completly.
- The topic ‘WHERE IN Clause does not support “NOT IN”?’ is closed to new replies.