Table API - How to filter by combination of two or more fields?

Ref. Brians API article

filters=[{“field”:“maytq_scrap_count”,“arg”:15,“functionType”:“greaterThan”},{“field”:“maytq_scrap_reason”,“arg”:“scratch”,“functionType”:“equal”}]

When I test this setup it returns an output that seems to be a result of a boolean OR.
Is there a setup that only returns the combination of both input fields where both fields are true?

For the example above I would like it to return records that have a scrap_count greaterThan 15 AND scrap_reason is scratch. Only those records that fulfill both of these two requirements should be in the output.

By the way, does the syntax used in the API filtering have a name. Is there a support page for this syntax?

hello @oviland, great question!!

this can be achieved adding &filterAggregator=all at the end of your query. more documentation on the API can be viewed at: https://{{instance}}.tulip.co/apiDocs. for example, for the filter aggregation:

How the filters in the filter parameter are combined. all means that every filter must match a record in order for the record to be included. any means at least one filter must match a record in order for the record to be included.

does this answer your question?? thanks again for posting!!

1 Like

Yes it does :slight_smile: . Thank you!

1 Like

great, thanks again for posting!!