I have a lists DB projects, in projects I have two fields "location" and "region"
suppose I use location and region as distinct dropdown.
I want to create a search from one or both dropdowns. How would I do this when multiple dropdowns are populated? I do not see Search having the ability to search multiple columns in the list, only multiple values.
can I do something like or how can I do:
If(IsBlank(region),Search('table',dropdown.region.value,"region"),Search('table',dropdown.region.value,dropdown.location.value,"region","location"))
Hi @gstlouis,
Is there a particular reason why you would like to use the Search function? Preferably with options you would use a Filter function with the equals operator.
//Search for exact matches via the equals operator
Filter(
'table',
IsBlank(dropdown.region.value) || region = dropdown.region.value,
IsBlank(dropdown.location.value) || location = dropdown.location.value
)
//Mimic search functionality via the 'in' operator
Filter(
'table',
IsBlank(dropdown.region.value) || dropdown.region.value in region,
IsBlank(dropdown.location.value) || dropdown.location.value in location
)
If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.
Thanks!
Hi @gstlouis
The Search function in PowerApps works on a single column. To perform a search based on multiple dropdowns and columns, you might consider using Filter instead of Search.
If(
IsBlank(region),
Filter('table', dropdown.location.Selected.Value = location),
If(
IsBlank(location),
Filter('table', dropdown.region.Selected.Value = region),
Filter(
'table',
dropdown.region.Selected.Value = region &&
dropdown.location.Selected.Value = location
)
)
)
(Or)
Filter('table',
If(IsBlank(dropdown1.Selected.Value),
true, dropdown1.Selected.Value = region) &&
If(IsBlank(dropdown2.Selected.Value),
true, dropdown2.Selected.Value = location
)
)
Thanks!
If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.
WarrenBelz
146,635
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,997
Most Valuable Professional