Hi, I created a directory and would like to search by department and display name when searching. In addition, exclude users who don't have a department name. The script below works but doesn't search by the department as well.
If(!IsBlank(Trim(TextSearchBox1.Text)), FirstN(Filter(Office365Users.SearchUser({searchTerm: Trim(TextSearchBox1.Text), top: 999}),!IsBlank(Department)),15))
So I tried the one below but it has now filtered most of my users but I only want to filter the ones who don't have a department.
If(!IsBlank(Trim(TextSearchBox1.Text)), FirstN(Filter(Office365Users.SearchUser({top: 999}),!IsBlank(Department)&&(TextSearchBox1.Text in DisplayName || TextSearchBox1.Text in Department)),15))