Embedded Filters

I thought I posted this 2 days ago but I don't see it in the posting so I will try again...

I need to filter a view on 2 fields.  I know how to create a simple 'AND' filter and an 'OR' filter:

var filters = {
'match': 'and',
'rules': [
{
'field':'field_567',
'operator':'contains',
'value': ctr_size_search
},
{
'field':'field_565',
'operator':'is',
'value':"Yes"
}
]}

I need help creating a more complex filter.  Here is the example:

field_1 == "No" AND (field_2 == "Interim Schedule" OR field_2 == "Scheduled")

Thanks for your help

 

1 Like

I know I've seen something in the community posts but have been unsuccessful in finding it now that I need it.  I think I'm close with the below but right now I'm getting a runtime error.

var filters = {
'match': 'and',
'rules': [
{
'match': 'or',
'rules': [
{
'field':'field_2',
'operator':'is',
'value': "Interim Schedule"
},
{
'field':'field_2',
'operator':'is',
'value': "Scheduled"
}],
},
{
'field':'field_1',
'operator':'is',
'value':"No"
}
]}