Filtering unique data in list (not unique elements)

I am trying to filter out duplicate values in a RG. The operation “unique elements” does not work here. Probably because the rows in the database are unique but the field “Document” isn’t. How do I tell Bubble that it has to validate the filtered list on unique values of field “Document” ?
P.S. the screenshots result shows two RG’s. One for the field procedure and one for the field document.
44

34

Hi Jorg!

If you just wanted a unique set of documents to be displayed (without the other fields from the App standard,) you would do that with an rg of text items using: Search for App Standards > document > unique elements:

However, if you want the rg to have other data displayed, I’d probably go with the rg having all App Standards that have documents, and just hide the rows when there is a duplicate since you are sorting by document (without the sort by document, you’d need to modify.)

Here’s what it would look like:
The repeating group:

A group to contain all display elements within the current cell (not visible on page load and collapses when hidden):

And a conditional on that group that chooses when to show the row (when the previous document is not the same as the current document):

Which is based on a hidden input in the group that gives us the previous row’s index:

Hope that helps!

–Ken



Looking to accelerate your app development?

Development of Advanced Apps at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

9 Likes

Hi Ken, many thanks for your solutions. The first one did the trick. Making type of content text. I have never used that before. So thanks for the tip.

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