I am totally new to Power Apps. I have yet to start learning but we have a number of Power Apps already used. One of them has a search button set up which does not work well. Before I dive in to try to understand this I wondered if one of the more experienced/technical Power App users might be able to give me an opinion on whether this search script (below) is efficient, or if there are any obvious ways to make a quick improvement.
I know this is a vague request, and any responses would be appreciated.
Thanks.
-------------------------------------------------------------------------------------------
If(
BrowseSearchApprovedCheckbox.Value = true,
SortByColumns(
Filter(
'Honour Master Data',
"Approved" in LookUp(
Hon_TransactionHelper,
ID * 1 = SPID * 1,
HonourApprovedFilter
)
),
"Created",
SortOrder.Descending
),
If(
IsBlank(BrowseTextSearchBoxGeneral.Text),
SortByColumns(
'Honour Master Data',
"ID",
SortOrder.Descending
),
If(
IDCheckBox.Value = true,
SortByColumns(
Filter(
'Honour Master Data',
ID = BrowseTextSearchBoxGeneral.Text
),
"ID",
SortOrder.Descending
),
SortByColumns(
Filter(
'Honour Master Data',
BrowseTextSearchBoxGeneral.Text in Title || BrowseTextSearchBoxGeneral.Text in Entity || BrowseTextSearchBoxGeneral.Text in Team || BrowseTextSearchBoxGeneral.Text in Status || BrowseTextSearchBoxGeneral.Text in Created || BrowseTextSearchBoxGeneral.Text in Description || BrowseTextSearchBoxGeneral.Text in Value || BrowseTextSearchBoxGeneral.Text in Currency || BrowseTextSearchBoxGeneral.Text in Payee || BrowseTextSearchBoxGeneral.Text in 'Sub-team' || BrowseTextSearchBoxGeneral.Text in 'Created By'.DisplayName || BrowseTextSearchBoxGeneral.Text in ID,
If(
BrowseSearchApprovedCheckbox.Value = true,
"Approved" in LookUp(
Hon_TransactionHelper,
ID * 1 = SPID * 1,
HonourApprovedFilter
),
"" in Status
)
),
"Created",
SortOrder.Descending
)
)
)
)
-------------------------------------------------------------------------------------------