Forum Academy Marketplace Showcase Pricing Features

Group within a repeating group


I’m building an LMS where we have different courses. For each course, we have different sections, and within each section, we have different lessons. For each of those elements, the admin can upload documents. So you can have multiple documents for the course itself, for each section and for each lesson. This generates a list of all documents in the course. I would like that list to be grouped and sorted with the hierarchy of the main course documents first, then the sections and lessons grouped together.

1 Like

Hello @mathias welcome to the community !

Various ways to go about this. Easiest way could be to categorize the docs with option sets that have a number attribute for sorting purposes (let’s call it order nr).

Options sets
Course (order nr: 1)
Section (order nr: 2)
Lesson (order nr: 3)

Then sort the repeating group via a combination of the number attribute ascending and created date descending. This should achieve the ordering that you are looking for (course docs first, section docs second, and lessons last)