I have a gallery where the Items function is currently filtered by the current user's email address being in hidden columns, the formula is:
Sort(Filter('LAB01', 'Creator Email'=varUserEmail||varUserEmail in Split(SharedWith,"; ")),Building,Ascending)
This means that only records which they created by or are shared with the current user will show up.
I would like to add in a dropdown or text input search bar so the user can select by building and/or room name/number, as the list is a couple of hundred records long in total and a search would be really useful.
I cannot seem to find a way to combine a search feature with the user filter however. Is there a way to combine a 'Searchdpd.Selected.Value = Building' into the above function so it both filters by user AND by the search bar/selection?
Solved! Go to Solution.
Thank you, this does work (though I didn't need the .Value). I had tried this before asking with the Building = Search before the Creator email bit, and without brackets so I was nearly there! Good to know I was on the right track and appreciate your help getting me there
FWIW, I had kept fiddling with this myself and came up with this solution too:
SortByColumns(If( Searchdpd.Selected.Value = "All Buildings", Filter( Search('LAB01', SearchBox.Text, "RoomNumber", "RoomName"), 'Creator Email'=varUserEmail||varUserEmail in Split(SharedWith,"; ")), Filter( Search('LAB01', SearchBox.Text, "RoomNumber", "RoomName"), 'Creator Email'=varUserEmail||varUserEmail in Split(SharedWith,"; "), Searchdpd.Selected.Value = Building)), "Building", Ascending)
which allows me to use both a dropdown search for the building and a text input for the room name/number.
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
Check out our new Discover Your Career Path blog post series and get all the details.