@Pstork1
No luck, I have placed some "Not" statements for some departments and chose the relative users by using an if statement. To retrieve the other users I embedded an if statement within the above if statement and 2 other if statements within each other.
Not the most ideal way of doing it but it worked.
Filter(
Office365Users.SearchUser(
{
searchTerm: "",
top: 500
}
),
Not("Dep1" in Department),
Not("Dep2" in Department),
Not("Dep3" in Department),
Not("Dep4" in Department),
Not("Dep5" in Department),
Not("Dep6" in Department),
Not("DisName1" in DisplayName),
Not("DisName2" in DisplayName),
Not("DisName3" in DisplayName),
Not("DisName4" in DisplayName),
Not("DisName5" in DisplayName), Not("DisName6" in DisplayName), Not("DisName7" in DisplayName),Not("DisName8" in DisplayName), Not("DisName9" in DisplayName),
Not IsBlank(Department),
AccountEnabled = true,
If(DisplayName = "Name1", true,
If(
DisplayName = "Name2", true,
If (
DisplayName = "Name3", true,
If (
DisplayName = "Name4", true
)
)
)
)
)Thanks for the advice.
Andrew