Aha!
I’m almost certain I understand what’s going on here now! What we are witnessing is Bubble’s automatic type conversion in action!
As I’ve noted in other posts, “Bubble will automatically convert a list of Text types into a comma-delimited string when that list is used in a string context.”
In fact, I’m leveraging this feature in this very test setup. The comma-separated tags in the Search Results RG is directly referencing an actual List object - the list of tags!
Therefore, what’s REALLY happening here…
…is that the “list of Texts” custom state (selected_tags) is actually being converted to a STRING (a Text data type in Bubble speak) - i.e. a comma-delimited string of tags - in order to satisfy the data type required in this context.
The observed behavior makes perfect sense in light of this, and it means that the contains operator does NOT work with two lists, but rather, it requires a single Text type for the comparison.
@anon38627393, I suggest you take another look at your filter implementation. At his point, I strongly suspect that the logic you’ve implemented is not actually working the way you think it is.
I’m really curious to hear your thoughts.
-Steve