Tell us what you are trying to do?
I have two post types - Teams and Coaches.
I have a many-to-many relationship set up between the two post types:
-- Teams can have multiple coaches
-- Coaches can coach multiple teams
Each coach is designated as a head coach or an assistant coach for each team they are associated with. So I created an intermediary post for the relationship between teams and coaches with a checkbox list field so I can do those assignments.
So far so good.
Now, I want to display the coaches on the page for the team. So I created two views:
-- Team Assistants
-- Team Head Coach
Both of them I've filtered as follows:
Filter by post relationship or repeatable fields group owner
Select posts in a Coaches Teams relationship that are related to the Post where this View is shown.
That works - it pulls in all the coaches assigned to the team.
However, I can't get the second filter so I can show the Head coaches separate from the Assistant coaches.
I can see the field I want to filter on in the filter options: Custom Field: Role On Team.
I've tried all the combinations of "strings" or "Numbers", but nothing makes the filter work.
The "Role on Team" field associated with the intermediary post is a Checkboxes field.
I have "Value to store" for the Head coach set to 1 and
the Value to store for the Assistant coach set to 2.
Thus, I would expect the filter to have logic like this:
For head coaches, I set the filter as "Role on Team" is a Number equal to 1.
For head coaches, I set the filter as "Role on Team" is a Number equal to 2.
I also tried "String" instead of number - that didn't work either
However, in both cases, I get no results.
The Team I'm working with is this one: hidden link
I'm removed the second filter for the view for the assistant coaches so you can see both coaches assigne
You'll see two people listed under Assistant Coaches. Right now, that is both coaches currently assigned to this team.
Brian Bacchi is the assistant coach
Steven Abbott is the head coach - he should be appearing by himself under "Head Coach" based on the filter I have set.