db query.addFilter(field, 'not equal to', value)

Is there a way to add a filter where I can get all the records that a field doesn’t have a value?

For example, let’s say I have a table that shows all the requests we’ve received from clients, and I want to query for all requests that DO NOT have the status of ‘disqualified’ or something similar. There are 13 other statuses a request could be, so adding ‘addFilter(field, ‘=’, value)’ for all 13 possible values I do want to see is a bit tedious.

something like ‘addFilter(field, ‘not’, ‘disqualified’)’ would be ideal if possible.

You can currently use a regular expression (regex) to retrieve records that are not “disqualified.”
However, your suggestion is very helpful, and we will discuss its feasibility with our development team.

1 Like