
I have a gallery that the user can select a button and the gallery will filter the items, but they should also be able to just search and that should search within the filtered items, the gallery should also be sorted by the modified date, below if what i have but i cannot get it to work
If( varShowInprogress,
Sort(
Filter(
D_HR_MedicalVpnRequests,
status.Value <> "Agreement Ended",
StartsWith(
employee.DisplayName,
StartsWith(employee.DisplayName ,SearchBox.Text)
)
),
Modified,
SortOrder.Descending
),
If( varShowAllApplications,
Sort(
Filter(
D_HR_MedicalVpnRequests,
status.Value = "New Application",
StartsWith(
employee.DisplayName,
StartsWith(employee.DisplayName ,SearchBox.Text)
)
),
Modified,
SortOrder.Descending
)))
Hi @CiaranCampbell ,
Probably something like this
Sort(
Filter(
D_HR_MedicalVpnRequests,
(
(
varShowInprogress &&
status.Value <> "Agreement Ended"
) ||
(
varShowAllApplications &&
status.Value = "New Application"
)
) &&
StartsWith(
employee.DisplayName,
SearchBox.Text
)
),
Modified,
SortOrder.Descending
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps