"Contains List" in filter with empty list


I’m pretty sure this is a bug, but I wanted to check to make sure.

I’ve got a number (around 5) of search filters which are lists of items. When I perform a search, I want to only return items whose list of items fields contain the corresponding filter’s list of items. I can’t do this with “search for”, so I’m using a “:filter”.

In order to accomplish this, I have an “advanced” filter that is “this Thing’s Field contains list LIST_TO_CONTAIN”. Here’s the problem: if LIST_TO_CONTAIN is empty, no results are returned, even if the “ignore empty constraints” checkbox is checked. I think this is a bug.

Imagine you had two lists, A and B, as follows:

A = [1, 2, 4]
B = []

Generally, you would say that A contains B. This is also the case in set theory, in that the empty set is a subset of every set.

Thoughts? Also is there a workaround anyone can think of in the meantime? Since I have 5 lists that may or may not be empty, I obviously can’t create a conditional for every possible combination of empty and not (2^5 = 32 conditions).

1 Like

For those stumbling upon this thread, a workaround is to do the following for the “Advanced” filter for each list:

Advanced: LIST_TO_CONTAIN:first item is empty OR This Thing’s Field contains list LIST_TO_CONTAIN"


You can also use :merge or :intersect to achieve similar results, depending on the scenario.

1 Like

This worked for me. Thanks!

1 Like

This topic was automatically closed after 14 days. New replies are no longer allowed.