Most of the various document queries in the system require a ‘filters’ array. It looks like the stock behavior is that the filters are chained with AND. Is it possible to chain them with OR so that records matching ANY of the conditions will match instead of only records matching ALL of the conditions?
Yes, this exists. Just use
or_filters exactly as you would
or_filters: [ ['first_name', '=', 'Alice'], ['first_name', '=', 'Bob'] ]
}).then(r => console.log(r))
Thanks, Peter G.
I see that or_filters is available for the db methods, but not for listview_settings.
I tried or_filters with listview_settings and it doesn’t work.
I think that’s right. I don’t believe there’s a way out of the box to use or filters on the list view. Some things you can achieve with the
in operator, but for anything more complicated you’d have to customize I think.