Forum Academy Marketplace Showcase Pricing Features

Sort and filter repeating groups based on a different data type

Hi all. I have a problem trying to filter and sort a repeating group.

In my database I have a user as in any normal application.

I also have a data type called TimeSlot, which, within all its different fields, has one called user (user type). TimeSlot represents the hours of availability for each user.

In the application, through various functions it allows each user to create different hours of availability.

The problem arises when I create a repeating group of all users and show their available hours.

I want to sort the list by showing first those with the most hours available, but apparently I can only sort the repeating groups according to the attributes that the data type user has, I can’t do it according to TimeSlot (which has a user type field ). In the same way I want to filter those who do not have available hours but the same problem happens.

Anyone know if there is any way to do it?

Try in your User data, add a column that has “number of TimeSlots available”. Set up the number the user starts off with, and set up a workflow so that when a TimeSlot is booked, this number decreases by 1.