I have a gallery in my app which is a list of staff and their job titles/departments (colAllStaff).
There are two listboxes on one screen next to the gallery. ListBox1 is all departments taken from colAllStaff which the user can select from (colDepartments).
ListBox2 is management level - two options are 'Directors and Heads of' and 'Managers and Assistant Managers'.
I have been able to set up filters for when there are departments selected or management levels selected but haven't combined the two.
So for departments I have:
SortByColumns(If(IsEmpty(ListBox1.SelectedItems), colAllStaff,Filter(colAllStaff, Department in conSelectDept)), "Department")For management level I found it easier to add a textbox with a concat of the listbox selected values, so this is:
If("Managers and Assistant Managers" = Label18.Text, Filter(colAllStaff, "Manager" in JobTitle), If("Directors and Heads of" = Label18.Text, Filter(colAllStaff, "Director" in JobTitle || "Head of" in JobTitle ||"Chief" in JobTitle), If( Label18.Text = "Directors and Heads of, Managers and Assistant Managers" || Label18.Text = "Managers and Assistant Managers, Directors and Heads of", Filter(colAllStaff, "Director" in JobTitle || "Head of" in JobTitle ||"Manager" in JobTitle), colAllStaff)))To combine them together would be quite long winded as users may select from department and not management level, or just management level, or use both filters. Have I missed a simpler way to do this?

Report
All responses (
Answers (