Implementing sorting by one field and filtering by another

Thank you for explaining! It is similar to what I thought … it doesn’t have a simple solution that can be applied to every case.