How to Sort and Download CSV with Repeating Group within Repeating Group

My data structure is as follows:

User
-name
-email
-working experience (list of a thing)
-job title
-salary

The number of working experiences for each user varies.

Currently, my page displays data like this:
name, email, job title1, salary1, job title2, salary2…and so on
Allen, allen@abc.com, engineer, 1000, HR, 2000

My questions are:

  1. Can I sort the data within the working experience list? For example, I want to find the user with the highest salary and sort the data in descending order.
  2. In this scenario of a repeating group within a repeating group, is it possible to download the table as a CSV or Excel file?

Hi! Answering your questions:

  1. Yes, you can do this by specifying the sort by field when you use the Do a search for operator in Bubble
  2. For exporting this as a CSV, you can use the solution below

Hope this helps :slight_smile:

Hi Thank you for your response.

I am very confused because I used 2 repeating groups and their data sources are different.

  1. What do you mean by “when you use the Do a search for operator in Bubble”? Can you explain more in detail? Thank you!
  2. Do you mean I have to convert the data to a JSON first, and then use that CSV Creator plugin?

Thank you!

Sure, no problem.

  1. This might be helpful for you - Search | Bubble Docs
  2. That’s correct. Check the usage in the plugin description. You can use arbitrary text and structure your content as a JSON there. Send that to the plugin and you get your CSV

Let me know if this is helpful :slight_smile:

I am so sorry for the confusion! It turns out, the way I present my data structure is wrong in my origial question. It should looks like

User
-name
-email
-working experience (list of a thing)
*job title
*salary

Users have multiple “working experience”(list of a thing), which contains fields “job title” and “salary”.

My question is how to sort the whole list by “job title” or “salary”. The solution you provide only works for sorting by “name” or “email”. Thank you!

Got it, thanks for the clarification. In that case, I would suggest to have a link from Working experience to User (have a field in your Working experience table, linked to a User).

In your RepeatingGroup, Do a search for Working experience, sort by Job Title/Salary and display unique instances of Users.

Does this work for you?

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