Hey all,
I’ve been building a CRM-style app in Bubble for a few months now, a call management tool with companies, campaigns, assignments, decision makers, and a queue system. As the app grew more complex I kept hitting the same set of walls. I’ve found workarounds for all of them but I genuinely don’t know if these are the best approaches, so I wanted to share what I do and ask the community if there’s something cleaner I’m missing.
You Can’t Sort a Search by a Related Type’s Field
This one hit me early. I have a Campaign Assignment data type. Each Assignment has a linked Company. I wanted to let users sort the Assignment list by Company revenue, Company employee count, or Company status.
Bubble’s search only lets you sort by fields on the type you’re searching. There is no “sort by Company’s revenue” operator when searching Assignments. It simply does not exist in the editor.
What the community often suggests:
Some people use client-side sorting with List Shifter or similar plugins. You fetch all records first and sort in the browser. This works for small datasets but falls apart the moment you need pagination. Once you have a few hundred assignments it becomes unusable.
Others try nested repeating groups, do a Search for Companies sorted by revenue, then render a nested RG of Assignments per Company. This technically produces a sorted visual result but is very hard to paginate, hard to style as a flat table, and gets slow quickly.
What I do:
I denormalize the sort fields. I add a company_revenue number field directly on the Assignment type, and a backend workflow fires every time a Company is saved:
Trigger: When Company is created or modified
Action: Search for Campaign Assignments where company = triggering Company
Make changes to list:
company_revenue = triggering Company's revenue
company_employee_count = triggering Company's employee_count
Now I can sort Assignments by company_revenue natively.
The downside is obvious, you’re duplicating data. If the sync workflow breaks or a Company is updated through an edge case path, your denormalized fields go stale. I manage this with careful workflow coverage and a backfill recursive workflow for the initial data population.
Is there a better way? Is anyone doing this differently at scale? I’m particularly curious if there’s a Bubble-native approach I’m overlooking or a plugin that handles this cleanly without breaking pagination.
Summary of the problem and My Workarounds
| Limitation | My Workaround | Concern |
|---|---|---|
| Can’t sort search by related type’s field | Denormalize sort fields onto the searched type, sync via backend workflow | Data duplication, sync coverage |
It feels like there should have cleaner solutions. I’m shipping production apps with this workarounds and it hold up, but I’m always a bit uncomfortable knowing it rely on workflow discipline rather than a structural guarantee.
If you’ve solved this differently, especially at scale, I’d genuinely love to hear it. What am I missing?