I just begin to learn Bubble and i try to spell in a repeating group a list of Item that answers to a special queries but I cant find how it does work.
Here is he context :
First - I have a list of item that have a parameter call “Theme” which is a list of option set that i call _interest :
The fact is that my users also have a parameter call “Interest” that is also a list of _interest :
What i really try to do is to list all Item which one of the Item’s “Theme” match at least with one of the “Current User’s interest” but when i try to put this request it is always in red and i cant conclude the constraint.
I tried this : “Theme contains Current users Interest”
But i also tried this and i don’t understand what i should put after this request ? For me the request should end here.
Thanks for your help guys !
You need to do the search with no constraints. Then at the end of the search click more and “filter”. Here you can select “advanced” and say “This item’s Theme intersect with Current User’s interest:count > 0”.
From Bubble Docs:
… intersect with …
This operation takes two lists of things and returns the entries that are in both lists.
Hi thank you for you answers !
But i imagine that the filter you were talking about is Filtered (There is no filter) :
But there is no possibility of "This item’s … " ?
I tried to put the intersect just after the filtered and i cannot close even after >0 i still have to add something .
I used to do a lot of SQL in the past but i don’t get how those queries works that’s so hard ! Why would i intersect with a count here, i didn’t even get that either…
You need to add it as a constraint on the filter itself, not in the datasource.
So click where it says ‘filtered’ to open the fitter constrains, then selected Advanced.
Then you can use the :intersects with operator.
Hi Adam, thank you for you great help. I finally succed to do what you said. But i still dont get how does it work ? Why would i need to do that “filtered” thing ? In a normal database i would just do a search for item with my conditio,n and that’s it ? I can’t understand why i had to go in advanced stuff here specially ? The tutos i watched did the normal things.
What happened if i would like to add one more constraint that doesn’t need to work on lists ? do i have to put this constraint on the normal search or the filtered one ?
Do you have any more documentation about queries ? Maybe one that go deeper in difficult queries?