Filter(
Office365Users.SearchUserV2(
{
searchTerm: SearchNametxt.Text,
top: 100
}
).value,
(
Find("(Business name)", DisplayName) > 0 ||
Find("(BUSINESS NAME)", DisplayName) > 0 ||
Find("(Another BUSINESS NAME)", DisplayName) > 0 ||
Find("(Another Business Name)", DisplayName) > 0 ||
Find(SearchNametxt.Text, JobTitle) > 0
) && AccountEnabled = true
)
ClearCollect(
UsersCollection,
Office365Users.SearchUserV2(
{
searchTerm: " ",
isSearchTermRequired: false,
top: 999
}
).value
);
Filter(
UsersCollection,
AccountEnabled &&
(
Dropdown1.Selected.Value = "Name" && StartsWith(DisplayName, SearchNametxt.Text) ||
Dropdown1.Selected.Value = "Job Title" && !IsBlank(JobTitle) && StartsWith(Coalesce(JobTitle, ""), SearchNametxt.Text) ||
Dropdown1.Selected.Value = "Department" && !IsBlank(Department) && StartsWith(Coalesce(Department, ""), SearchNametxt.Text)
) &&
(
Find("(Business Name)", DisplayName) > 0 ||
Find("(BUSINESS NAME)", DisplayName) > 0 ||
Find("(Another BUSINESS Name)", DisplayName) > 0 ||
Find("(Another Business Name)", DisplayName) > 0
)
)
Filter(
Office365Users.SearchUserV2(
{
searchTerm: SearchNametxt.Text,
isSearchTermRequired: false,
top: 999
}
).value,
(Len(SearchJobtxt.Text) = 0 || SearchJobtxt.Text in JobTitle) &&
AccountEnabled &&
(
Find("(Business Name)", DisplayName) > 0 ||
Find("(BUSINESS NAME)", DisplayName) > 0 ||
Find("(Another BUSINESS Name)", DisplayName) > 0 ||
Find("(Another Business Name)", DisplayName) > 0
)
)
Much appreciation for the help!Filter(
Office365Users.SearchUserV2(
{
searchTerm: SearchNametxt.Text,
isSearchTermRequired: false,
top: 999
}
).value,
(Len(SearchJobtxt.Text) = 0 || SearchJobtxt.Text in JobTitle) && AccountEnabled
)
Filter(
Office365Users.SearchUserV2(
{
searchTerm: Self.SearchText,
isSearchTermRequired: false,
top: 999
}
).value,
(Len(SearchNametxt.Text) = 0 || SearchNametxt.Text in JobTitle) && AccountEnabled
)
Filter(
Office365Users.SearchUserV2(
{
searchTerm: Self.SearchText,
isSearchTermRequired: false,
top: 999
}
).value,
(
"(Business name)" in DisplayName ||
"(BUSINESS NAME)" in DisplayName ||
"(Another BUSINESS NAME)" in DisplayName ||
"(Another Business Name)" in DisplayName ||
(
Len(SearchNametxt.Text) = 0 ||
SearchNametxt.Text in JobTitle
)
) && AccountEnabled
)
Find
function is case-sensitive. If you want to handle case insensitivity, you can use Lower()
on both the search term and the fields:JobTitle
field is not empty before searching. If it's empty, it might return unexpected results.
WarrenBelz
89
Most Valuable Professional
MS.Ragavendar
60
stampcoin
48