How do I check if an item (Any item) In a list, is present on another list of the same datatype?
It would be nice if bubble included a feature like this LIST A contains LIST B ANY ITEM
How do I check if an item (Any item) In a list, is present on another list of the same datatype?
It would be nice if bubble included a feature like this LIST A contains LIST B ANY ITEM
Hi there, @primedevs… check out the intersect with
option… that should get you what you need.
Best…
Mike
And just a lil more color here:
List_A :intersect with List_B
returns a list that contains all items common to both lists. If there are no items in common between A and B, this list will have zero items.
So, to use this as a boolean expression in a Condition or whatnot, you could write (for example):
List_A :intersect with List_B :count > 0
or
List_A :intersect with List_B :first item is not empty
Either of those expressions will be true (yes) if the two lists have any items in common.
Hello ! I’ve something similar to do :
2 lists with same datatype. I display the list for user #1 and want to change the font color of items that match with current user #2 's list items
I tried this but seems Bubble s wainting for something else :
@Sarah_Esteve A condition would expect a yes (true) or no (false).
So, to use this as a boolean expression in a Condition or whatnot, you could write (for example):
List_A :intersect with List_B :count > 0
if you check the issue tracker, most likely it will say that Bubble expects a Yes or No but right now it is a list of items.
thank you for responding @casheets123 !
I still don’t understand how to change the font color for each item in common…
It’s for now changing all the items color
Or maybe I need to display 2 blocks : one wit common items and the other one with not in common