4

Drupal 7.22 Views 7.x-3.7

Hi, I have two similar content types and have added a boolean field to both (x for one and y for the other). I want to create a view that displays any of the two types if x or y is true.

If I add the first filter criteria: Content: x (= Yes), I see a result in the preview pane. If I remove the first filter criteria and add the second filter criteria: Content: y (= Yes), I see a result in the preview pane.

So both work on their own. If I try to 'or' them I get neither?

I have tried this in various ways (one filter group or two separate groups). I have also tried simplifying this by changing the fields to text but the or is still not working?

Please can anyone help or point me in the right direction?

Thanks! a.

1

Add a boolean value to both content types, should be the same boolean you created. no need to create a different boolean field for each content type.

create a view:

  1. filter for the "Operator - Is one of" and chose your two content types.
  2. filter for you boolean field wich was added to both content types "Operator - Is one of" and select "yes" or 1 depending on your field yes value.
  3. add what ever fields needed.

I have created two content types "content one" and "content two" and added the boolean field "check me" to both.

here is my view: enter image description here

  • Hi saadlulu, that is fantastic, thanks so much for your help. Very much appreciated. Do I need to do anything to mark this as answered and credit you? a. – Alex Jun 2 '13 at 15:33

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.