I have spent several hours breaking my head with a problem with repeating groups, and have finally concluded that I really ought to ask for help!
I have made a repeating group following the instructions in this Bubble tutorial. Instead of ‘Project’, I have ‘Opportunity’; instead of ‘Category’, I have ‘Sector’. Like them, I have set the latter as ‘List of texts’ in the database. This is what the tutorial shows:
This repeating group should display ‘opportunities’ from my ‘Agriculture & Food – Crops’ sector, but when I check the page, nothing shows up at all (there should be one test entry). There are no privacy settings set, so I’ve ruled that out. When I gave my test entry a slug and then changed the data source to ‘slug’, the test entry did show up.
I have no idea what I’m doing wrong, can anyone guide me? Or could it be that there’s a bug, in which case, might there be a workaround?
When constraining by a list of texts field, and using the ‘Contains’ comparison, the search will look for database entries who’s list of texts contains that (whole) text, not for an individual text within that list that contains the text you’ve typed.
In other words, it’s the list of texts that are being searched to see if the list contains the individual ‘text’ (in full) you’ve entered, NOT the individual texts within the list to see if they contain the word you’ve entered.
So, in your case, you’re searching for Opportunities who’s Sector (list of texts) contains the text ‘Crops’.
And, evidently, there aren’t any such Opportunities in your database (I’m guessing you have opportunities with lists of texts containing ‘Agriculture & Food - Crops’ as a text, but not ‘Crops’ - hence why your search is returning empty).
One quick solution, as you know the text you’re looking for and it’s static, is just to put the correct (full) text in the search constrain: i.e. Sector contains Agriculture & Food - Crops
Having said that, I personally wouldn’t recommend using a list of texts for this at all - it would make much more sense to have a datatype for ‘Sectors’ (or maybe even an Option Set), and then use that as the field ‘type’ for the list of sectors.
Many thanks indeed for spending some time on this for me, @adamhholmes. I must admit that I got a bit lost, probably because I’m such a newbie at all this! However, I did solve the problem in the end. I realised that I’d be better off using a dropdown search instead, and then populating the RG with whatever choice the user selects from the dropdown. That turned out to be a relatively simple fix for me and will work for my MVP purposes. In time, I would like to be able to display search results from more than one sector, but I can grapple with that later, I think.
Thanks again for your help! Hopefully your advice will be of use to others who’re stuck with something along these lines and would like to implement something marginally more sophisticated.