Removing duplicate records in repeating groups

Please pick a subcategory to help organize the information. Thanks!

Hi, I’m after some assistance please with removing duplicates in a repeating group. To help understand, I’ve drawn it up, please see below, and also included a text description…

I have a User (User 1) who has multiple profiles (Profiles A and B); another User (User 2) has one profile (to keep it simple) and has connected with both of User 1’s profiles.

I now have a screen where User 1 can see all of their different profile connections, and within it is a RG identifying the connections, and a nested RG identifying the profiles. And (rightly) the RG is currently showing the profile of User 2, twice, because it is connected to 2 profile that belong to User 1.

MY CHALLENGE is to find a way so that User 2 profile is only listed once, otherwise it’s simply cluttering the screen and isn’t a great user UI. I have tried Group, Unique Elements, and Filter, and can’t get any of these to work.

As a workaround, I’m just about to add a dropdown so that it only shows connections relating to User 1’s selected profile, and then User 1 can switch between them, but ideally I’d simply like to have all connections listed for User 1, without the duplication.

I know this isn’t an ‘error’, it’s just having the expertise to work out how to achieve it??

I hope that makes sense and someone has some ideas!

Thanks in advance.

Sonya

If you reference all your Things as Things, this problem goes away. Multiple Things in a list? Just :unique items them.

(The same pretty much goes for built-in datatypes, BTW.)

BTW2: I’ve never seen this complaint before. Mostly, what we see here is folks that are attempting to work AROUND the fact that Bubble lists quickly become Sets and not arrays. First time for everything I guess!

Thanks for the prompt response Keith, really appreciated. Could you please elaborate on your first sentence? ‘If you reference all your Things as Things…’ where are you saying to do this, in the Profile RG, Connections RG, both?

Both are Type Profile and Connections already, which are both Things.

When I have tried :Unique Elements it said I need to change the Type to text?

Maybe I’m not understanding what you are advising?

Thank you!

I think you understand what I advised. But note: If you are writing an expression in a text element — or indeed any field that expects a text — your expression can’t end at the object (Thing) itself.

Things don’t have a default text representation. We have to go to one of their fields.

If Things did have a default representation, that would be the Unique ID field, which for all intents and purposes is the Thing.

This topic was automatically closed after 70 days. New replies are no longer allowed.