Forum Academy Marketplace Showcase Pricing Features

[Bdk Concepts] Livesorting in bubble

Hello Bubblers,

A lot of things can be achieved using a combination of Bdk Plugins.

Inspired by @SerPounce’s suggestion & feedback like this, sharing here an an example of Live sorting a RG based on a calculated metric. This example uses 0 workflow steps, doesn’t require saving anything to database, and is very fast.

Click here to open bubble page
Click here to open bubble editor

Below is a screen recording of the demo:

It makes use of 2 of the bdk plugins:

  1. RepeatingGroup Tools (bdk) plugin
  2. TransformList element from the Utilites (bdk) plugin

Cheers & Stay Safe,


@gaurav - You’re simply the best!


@gaurav this one stumps me.

I’ve got it all setup the same way as you except the primary RG is in a popup (hidden from view) with secondary on the main page itself, but there are no lists being called by the RGData controller.

Popup containing the controls:


I’m wondering if the order of the page load has something to do with it? I.e. when the page is loaded nothing is present inside the RG’s to sort - is this causing an issue or something? Can’t see how it could though, when everything is based on dynamic content inside of a RG and the Count of the RG is being called just fine…


As you can see the connection is calling the ‘max’ number from the database by Count OK but not List 1 or no List 2 data:

And as suspected on Transform List A’s input list, it’s (empty):

The trick is you must have all of the elements on the same page.

You cannot hide any of the 3 elements in a popup.

It works well, thanks @gaurav


Hi @JustinC,
Yep. Unlike its own elements, bubble requires plugin elements to be visible to run their initialisation code. Hence if the popup is hidden, its the same as not having the plugin element there in the first place :slight_smile:


1 Like

@gaurav it looks like the BDK will solve the problem I have here: Create a repeating group via the entities contains list

Any chance you could confirm please and I’ll buy it now :slight_smile:

@gaurav is this a known plugin limit I’m hitting here?

If the Input List has entries > 0 it loads them OK, but the second I apply a filter on the input list that brings the number of entries to 0, it KEEPS the same list of items inside of the output repeating group and does not go to zero like it should.


For all other filters i am using on the list it reduces/changes the list dynamically except for when the filters are applied resulting in 0 entries.

I believe I’ve sorted this out!

@gaurav any chance you can add in a few more data inputs?


I’m about to use up Column 3, but need to be able to inject additional data.

Hmm I’ll add in the next update. But you can use mutliple of those too! Each one supports 5 outputs

1 Like

Hi @gaurav

This is really cool! I had a look at your example in the editor and I’m wondering if this is possible with only one RG? It looks like the datasource has to be the output of the transform list, which is derived from the data extractor of a different RG.

1 Like

Thank you @casheets123. It actually uses only one RG as input for the processing. The other one is to display the output for the demo… you can use the transformed output anywhere you’d like :slight_smile:

Implemented this for a client today, first time using it.

Absolutely brilliant, fast & works a treat. :+1:

@gaurav I’m struggling to get the transformed list to sort the results from ascending to descending.

I’ve copied your setup from the demo and replaced the data source with my repeating group, however the output in transformed list is an unsorted list of items - it does not sort the items at all.

Here is my setup

I suspect the error is in the sorting script somewhere but I can’t figure out where. Can you help?

Hey guys,

I’m trying to build a compatibility score and sort that - so think of how Netflix gives you match % based on stuff you like or the input of the type of genre you like.

I am looking to make a compatibility score Wise sorting between users based on the input they give. So imagine a user who has logged in and is now viewing a repeating group of other users, who are sorted based on their compatibility score. How can this help solve the problem? Any recommendations will be golden.

Have you thought about using something like this: Can someone help explain :ranked by?

It might be what you need. Hope that helps! :blush:

Hope that helps! :blush:


For All Your No-Code Education Needs:

  • One-on-One Tutoring
  • eLearning Hub
  • Video Tutorials
  • No-Code Classes

Thank you @andy.i!

Hi @messly,
While I can’t provide support for writing the function, on a quick glance I saw that your sorting_metrics is missing join with ,
Note that you can also use console.log inside the function to sort of see what’s the value being passed around inside a function at any point

This sounds a lot like the demo example. Do check out the editor and demo link here and think of how your data source and metrics would apply there instead of the demo

This is amazing!

However, I’m having a hell of a time doing something that should be quite simple, such as filtering out 0 values from my final sorted list.

At the end of the JS, before returning the list, I have:

filtered_sets = sorted_sets.filter (sorted_sets => sorted_sets.value > 0);

Then, instead of returning sorted_sets, I return filtered_sets.

Sounds pretty easy, but instead of my resultant list having anything in it, it’s empty, like it needs to know how many values are going into it before it’s rendered. And because the initial set has nothing in it (all values are 0 before stuff is done on the page), it is expecting 0 results.

Logging to the colsole shows there’s nothing wrong with my JS - see the sorted set vs the filtered set:

Filtered vs sorted

It’s just that the final repeating group is just being stubborn and saying - sorry, you should have told me how many values were going to be here in the beginning - I got nuffin and I’m staying with nuffin.

Is this a bug?