Hello everybody
I’m doing a search for in a repeating group and I having a problem.
Right now, the info I need to look for comes in the URL, so I do a search for using those items.
I’m doing a search for users, based on their gender, nationality…
this one is the first slide on the search form, so, they can select: one, both or none.
If they select one or both I know how to act, but if they select none of the options, what would you do?? I though using a conditional, but the problem starts when you have another options also unclicked.
This ones are each one a custom state. So I do this:
Now i’m sending at URL a parameter gender (yes/no) to make the conditional
But I don’t know how to do the new intersection when other options are unclicked.
Hope I’ll explain it fine and thanks in advance.
Hello!
Inputs are shown in the post to make choices.
But the inquiry for suggestions is about finding data with elaborate expressions.
Could you please restate what the problem is?
My biggest problem is that I don’t know how to intersect the new conditions.
Because if the user who’s doing the initial search doesn’t select gender and also nationality for example, how can I make those ones appear at the result??
Think through how you structured the database and ask yourself if it is suited for what you are trying to do.
What I gather you are doing is presenting a user with choices. No idea how the database is structured, so no idea how these choices impact what object or objects.
I also gather that these choices affect a search via constraints on the server side and filtering on the client side (the browser).
It seems these choices are affecting groups of data (no idea how they are structured) that you want to extract. The intersecting is telling me that they are located in different parts pf the dB or perhaps their fields (no idea what type of fields … objects, yes/nos, etc) act in a way that a combination of choices make you have to intersect searches on the same objects. I am doing big time speculating here…
Perhaps if you share and explain a bit your dB structure and a little bit more of the user story, folks can chime in
I’m doing a search for users filtered with their information, and the result must be a list of users filtered by client search.
So the client who’s looking for particular options of a user, could select gender: male, female or none (wich means male and female) and could also select nationality: spanish, french, portuguesse… or also not select any (wich means he doesn’t mind the nationality) and more items like age, drive license…
So at the time of the search, the part where the client select male and spanish, it’s quite easy because I know the parameters, but where the client doesn’t select none I don’t know how to pick all the users and also It could be that the client selects male but no nationality… Basically there’re a lot of possibilities to make conditionals.
Search 1: both clicked → the search for:filtered intersect search for:filtered I made
Search 2: gender no clicked, but others yes → conditional part, but, how can I complete the search for introducing all the intersect
Hope I’ll explain it better now.
1 Like
The search on a database must be something like this:
Gender- Male - Female
If there’s no chosen one
IN([id_gender],[id_people_search].[id_gender])
Disponibility- Mañanas - Tardes - Noches
If there’s no chosen one, the search would be → OR(COUNT([id_people_search].[id_disp_hours])=0
If there’s chosen, you look for users that have that one
COUNT(INTERSECT([id_people_search].[id_disp_hours, [id_disp_hours]))>0)
Nationality
You would search for people without selecting their nationality:
[id_people_search].[user_nationality]=FALSE → you don’t look for it
And if you need a particular one:
[id_pepople_search].[user_nationality_select]=[user_nationality_select])
… and the same with all the files of a user
1 Like
@ubu.qaf
Thanks! Great walkthrough.
You are dealing with lists … and these lists are of a non-object … namely texts.
For the first point … lists … I suggest you familiarize with how this concept is handled in Bubble. These YouTube videos should help. Look to learn how items in a list are added/substracted … it is likely they show how custom lists states work as well. All of this can help you with filtering.
As for the second point, I have a preference of using objects instead of texts or numbers or dates which are non-objects that can also be filtered … but that is just it. No way to avoid misspellings, duplicates, relationships, etc. Perhaps you could re-visit your dB structure and replace some of them with objects or with option sets where appropriate. Objects when you need to create/update/delete more of them … and option sets when they are set with no need to manage them (create more, update, or delete).
These other videos could complement the above suggestion:
And this different technique … but interesting in some situations:
I am sure that you know most of the above. I am just presenting suggestions to spark ideas on how to approach your build.
¡Buena suerte!
1 Like