Thank you, Stefan, that worked perfectly. And for other newbies like me, this is what the final result looked like:
SortByColumns(
Search(Filter(z_AGENCIES, 'TOP_LEVEL' = 'TOP_LEVEL (z_AGENCIES)'.Yes),AgencySearchTextInput_2.Text,"cr951_agency", "cr951_subagency", "cr951_agency_acronym", "cr951_subagency_acronym"),
"cr951_subagency")
------------------------------
Rik Forgo
Writer/Editor
------------------------------
Original Message:
Sent: Feb 24, 2023 02:09 AM
From: Stefan Sauerländer
Subject: Converting a Gallery Filter() to a Search that includes static values
Hi Rik,
you may try to replace z_AGENCIES
in
SortByColumns(
Search(z_AGENCIES,
....
with your complete working FILTER(..) statement. It provides a table, that is needed as 1st parameter for the Search function.
stefan
------------------------------
Stefan Sauerländer
Business Analyst
Ratingen
Original Message:
Sent: Feb 23, 2023 02:59 PM
From: Rik Forgo
Subject: Converting a Gallery Filter() to a Search that includes static values
Good day,
I have a Gallery I'm using that includes a Filter that reduces a Dataverse table's found set to just the records that have a "Yes" in a Yes/No column:
Items - Filter(z_AGENCIES, 'TOP_LEVEL' = 'TOP_LEVEL (z_AGENCIES)'.Yes)
It works fine, but the resulting data list is still over 300 records long, so I would like to further narrow the results using the search function that incorporates a search input text box AND the static "Yes" choice against the TOP_LEVEL column. This search works:
SortByColumns(
Search(z_AGENCIES,AgencySearchTextInput_2.Text,"cr951_agency", "cr951_subagency", "cr951_agency_acronym", "cr951_subagency_acronym"),
"cr951_subagency")
How would I incorporate the Yes/No selection into the Search function?
------------------------------
Rik Forgo
Writer/Editor
------------------------------