I have two flags, Flag A and Flag B. I need to have a view that lists the nodes that flagged under A and also the nodes that flagged under B.

Using Include only flagged content option in Relationship, I only get the nodes that are flagged by both the flags. But in my scenario I need nodes that are flagged either by flag A or flag B.

  • So you want A XOR B? – Felix Eve Apr 23 '14 at 10:30
  • I need A OR B.By using filters in views I can get only A AND B – Gobinath Manokaran Apr 23 '14 at 10:51
  • Got ya - in logic this is called XOR (exclusive or). What field type is your flag? – Felix Eve Apr 23 '14 at 11:13
  • The flags are of node type – Gobinath Manokaran Apr 23 '14 at 11:17
  • But your content can be either flagged A or B. So that is a field attached to your content type. What type is that field? "Node" is a type of entity, not a type of field. – Felix Eve Apr 23 '14 at 11:19

I found out the solution for this question.


If you are using Views 3 / Drupal 7 and looking for the answer to this question, it is baked right into Views. Where it says "add" next to filters, click the dropdown, then click "and/or; rearrange". It should be obvious from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.