Hi bubblers,
I’m building a lyrics writing app with the following data:
punchline
- content - text field
- tags - list of tags added to that punchline
- writers - list of users that can edit this punchline
tags
I have a repeating group that displays the user’s punchlines.
Search functionality
I would like the user to be able to find a punchline by a text search and also by tag filtering. Here’s how I did it so far:
The RG data comes from a Search for punchlines with the following parameters

Regarding the tags now, I created a state on the search bar temp_search_tags that is a list of tags in which tags can be added/removed depending on which ones the user clicks on. When searching, I would like to sort out the punchlines that have all the tags in this list added to them.
However, I can’t seem to be able to add another Search constraint for the tags in my RG.

How can I filter the punchlines according to the temp_search_tags list?
Is there a smarter way to do such a filter rather than having a state on an element? I guess yes since I can’t do it this way
.
Thanks for your help!
3 Likes
hi creaconseil.fr
my app example has music pieces, which all have a list of instruments.
The user can click instruments to select / deselect them to current users list of instruments.
You can then make the search work using “Do a search for:filtered” and using an advanced filter to see if the list of the user contains what is found in the repeating group.
The advanced filter also allows you to use multiple constraints simultaneously.

Let me know if this works for you
regards,
Julius
1 Like
Hey Julius,
Thank you for your answer, this is exactly what I was looking for!
You just expanded my horizon with this “Advanced…” filtering option it opens a whole new world of possibilities with Bubble.
Hey @TipLister,
I implemented your solution and had it working for a bit. However, I changed my workflow ( where I basically just added a step to add the punchlines to a list in the user data type) and now your solution only displays the punchlines that do have tags, all those that don’t disappear in my RG and the filtering doesn’t work anymore.
Here is the RG data source just like you showed me
Here is the workflow triggered when the user saves a new punchline

Here are the few solutions I already tried that didn’t work:
- Filtering backwards : FloatingGroup search’s temp_search_tags contains list This punchline’s tags - nothing displayed in the RG
- Filter on one tag only : This punchline’s tags contains FloatingGroup search’s temp_search_tags: first item - nothing displayed in the RG
Are you seeing anything that would explain why it’s not working? Could it come from something else?
Thanks again!
Hi. some hints.
Usually i would expect not to create a punchline but to add a punchline to the Floating group’s list of tags.
Does the FG search temp search tags have any tags inside at the start or is the song or content empty perhaps?
In this case, you could in the repeating group perhaps first use one data source at the start e.g. just do a search for punchlines and only if tags are not empty , add the Conditional data search with the advanced filter.
Hey @TipLister thanks again for taking the time to answer me,
The FG temp_search_tags list is indeed empty at the beginning of the search but I was thinking that with the “ignore empty constraints” option it should normally not be a problem.
I followed your advice, I have a regular RG without the tags option and an update on the RG when the Search option is activated.
I’ll keep searching and post the solution here if I manage to find one.
1 Like