I have a problem showing search results in a repeating group, and I don’t know if it’s a bug or not.
I have a SearchBox in one page and I want to send the typed text to another page, so I can show the results in a RepeatingGroup. I’m sending the typed text as a Key. The workflow works as intended but the search results are a little odd.
For example, in my tests, I search the word “love”, the SearchBox sends the world “love”, but the RepeatingGroup not only shows the results with the word “love”, but also including words like “lovers”, “loves”, and so on. I would like to show only search results with the word “love”, but I haven’t found the solution yet.
I believe search is meant to do this because that’s the most common way we want search to work.
One workaround for your use case might be to add a space before or after the word and search for that. This way, “lovers” and “loves” wouldn’t fit the search for " love " - Furthermore, you might want to combine that with searches for, say, " love." to catch it when it’s at the end of a sentence.
Thanks! I’m sure that your suggestion will solve my problem. However, I tried to accomplish this but I cant figure out how to perform a search with spaces. First I tried in the key, but since you cant have blank spaces in the URL, it didn’t work. I also tried to include the spaces in the search that the RepeatingGroup performs after receiving the URL parameter, but nothing different happens. Can you please point me in the right direction?
First, I should say I haven’t done searches with spaces, so I’m only hypothesizing it’ll work. I’d estimate there’s a 60-80% chance it’ll work.
As for implementing it, there is a way to send spaces in a URL. The key is to encode the text as a URL (it’ll change spaces to %20 which the browser knows to interpret as spaces.) The way to do this in Bubble is once you have the text then add “:formated as” and choose “URL” and that should work.
Let me know how it goes! If this doesn’t work, I have a few other ideas although they’re a bit more involved.