I have a lead generation platform that connects consumers with moving companies. Moving companies can set their service areas at the city level. I want to match them with consumer requests based on both the current city and the moving city. Currently, my platform in Bubble only considers the city of the current address for matching, but I want it to also consider the moving city. This means that the set service area should include one of the two City, not just the current one.
I have both the fields in my database as âCityâ and 'Moving City
Use advanced filters. After your search for open campaigns add :filtered and then type in advanced. Then you can get some other operators and play around until you get what you want.
Yep. And youâd better put as many constraints as possible within Do a search expression cause Advanced... filtering is performed client-side (so it influences performance and WU consumption cause Bubble will fetch more items from the DB for advanced filtering)
Since this is a lead gen platform Iâm going to assume youâre going to have a pretty hefty number of db rows you must filter through. You will not want to use advanced filtering on large data pulls. Itâll be slow and heavy.
When using advanced filter youâre going to basically have bubble reiterating that initial search a minimum of 3 times.
Once on the do search for⌠once on filter and once and advanced.
If you have 10,000 items you do that on itâll be a sluggish nightmare.
Rather, try looking for an alternative solution, few potentials off the top of my head.
1: change UI to fit your flow better (ex separate search field for moving from / moving to)
2: Keep current UI add a new data type called âaddress listâ which is a âlist of addressesâ on lead. All this is is the moving from & moving to addresses in the same field.
This way you can do something like âdo search forâ contrained address list contains âsearched cityâ. (This method is commonly used for things like key wording)
Thatâll reduce recurring workload that youâd have to have with filter/adv filter and wonât see performance degradation with db size.
May want to use DB triggers for anytime a to or from address field on lead is updated it updates the âaddress listâ field.
Filtering and adv filtering should be your last choice & typically used only on smaller datasets if you must use it. Many times adding a field or restructuring data can completely avoid it and maintain search and app speed.
Thanks a lot for your reaction. That also was a idea of mine but i didnt thank that would work, to have a list of âCityâsâ in the Leads data field.
Can i add a constraint There to say something like âis inâ or something?
Created a RG and here comes al of the âpotentialsâ who can get the lead. And added a new field called âProvinicesâ = (Cityâs in English). This is a text type, and a list. I added both the current city of the lead, and the moving city to the list.
But, no users show up. So I think this is saying âOnly when werkgebied contains BOTH Provinciesâ , but I want it that is needs to be show up when one âCityâ on the users field matches the Service area of the user (Werkgebied).