2

I having a view which result in a table with three fields like:

                 field1, field2,field3
row1 with values 100,    110,   503
row2 with values 200,    520,   110
row3 with values 300,    530,   210

All numbers are nid. All fields are in different node types. I'm calling /foo?nodeid=110.

I'm trying to setup a view so that row3 is not displayed anymore and I can eventually have a table with row1 and row2 with the values of field1.

I tried a lot but do not get it. If I have one contextual filter I can filter the table on field2 and if I have another contextual filter I can filter on field3. But I cannot combine them like a normal filter like and/or.

Any suggestion how to solve this?

Note: For now my view is a table but in the end I will use it under webform so it then will be a webform display with a webform selection list.

2
  • What is your views FORM, is it Table, Grid?
    – CodeNext
    Commented Jul 25, 2016 at 10:03
  • For now it is a table but in the end I will use it under webform so it then will be a webform display with a webform selection list.
    – Justme
    Commented Jul 25, 2016 at 10:32

2 Answers 2

3

Try Views Argument Substitutions. It lets you use contextual filter values in the regular filters.

  1. Add a Global: Null contextual filter to get your default value. It's very important to use Global: Null so the view isn't filtered.
  2. In your regular filters, you can add that value with * * * 1 * * * (no spaces) so that you can add AND / OR stuff. Use a different number if your Global: Null isn't at the top of the contextual filter list.
0

If you can achieve this using normal filter, you should go for that. You can fine-tune your Normal filter by creating new filter group in filter and then you can use And/Or inside one group of filters and in-between the filter groups. You can refer the first image in answer of this question Excluding Book children from a Custom view as an example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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