Created a company directory. I want a user to be able to search employees by name or department.
In this formula, I want the user to be able to search for the employee by first name or department by entering the information in a single text box. However the formula doesn't work
If( !IsBlank(Trim(TextSearchBox1.Text)), FirstN( Filter( Office365Users.SearchUser({ searchTerm: TextSearchBox1.Text, top: 999 }), Or( !IsBlank(Department), First(Lower(Split(DisplayName, " "))) = Lower(Trim(TextSearchBox1.Text)) ) ), 15 ) )