General question - multiple complex filters on repeating groups

I have a general question - what’s the best practice for filtering/sorting repeating groups when you need to use multiple complicated filters?

For instance I have a repeating group of users, and for one filtering field I have to run separate workflows to calculate that User’s Schedule and determine whether they’re available. And then other filters need to work on top of that.

Right now I’m using hidden repeating groups for each individual filter and then in the hmain repeating group I have it check if those users are visible in the hidden groups. It’s getting complicated and I’m pretty sure im doing it wrong

Is it for a scheduling application or feature?

Yes, I’m trying to display a list of doctors, not just by their availability but also filter them by distance, number of shifts completed, etc. To know if they’re available takes a couple steps

Those are simple and just need to use constraints like any other search would, so you search for doctors with constraints against the distance, the number of shifts etc.

How are you calculating availability? If you are not using a plugin, you’ll likely have issues, unless you know javascript and are using the toolbox plugin to run your javascript, you’ll probably need a plugin that does the availability functions.

My free template ScheduleMe is a Calendly Clone and is a 100% complete fully functional scheduling application powered by the paid plugin. You could use the template as a starting point, integrate it into another application or just use it as a learning resource to understand how to properly work with the plugin scheduling functions.

But if you already have a solution to perform the scheduling calculations, then you should already be all set to do the scheduling in one step (maybe a couple elements involved).

Yes, just have one repeating group searching for doctors that match the main criteria of distance and number of shifts, and then use the availability filter after that.