cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

2 dropdown boxes. Then user searches table to return matches. HELP

Hi all, 

 

I need to search this table to return a 'Name' result, 

 

I have 2 dropdowns: 

1.) User chooses category (NPI, Brand management etc)

2.) User chooses Yes or No

 

Then I would like to search to return all 'names' that the dropdowns satisfy.

 

Thanks for the help 🙂 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Oh, the formula is going to be a bit different because I thought that your different categories where in a column named 'Category'. Since you have different columns on each category, you'll have to filter differently.

You'll kind of want to do something like this, where you check on the column name which is selected in the first dropdown where the value matches that of the selected in the second dropdown.

 

Filter(DATASCOURCE_TABLE, DropDown1.Selected.Category = DropDown2.Selected.Choice).Name

 Although I'm not sure this will work for finding the correct column name, because the selected item might not be recognized as a valid parameter.

 

The difficult part is that on the categories you search, they actually are column names and not integral data on which to filter the data. If above code does not work, you'll have to find a way to get the columnname that matches the dropdown, on which you're then going to filter your data.

View solution in original post

3 REPLIES 3
SkiDK
Solution Sage
Solution Sage

 Hey @Anonymous 

 

Filter(DATASCOURCE_TABLE, Category = DropDown1.Selected.Category && Choice = DropDown2.Selected.Choice).Name

 

This would be a standard formula to lookup record in a table with conditions. I named the column name of the first Dropdown 'Category' and the second 'Choice'.

 

I'm not sure what you mean with Yes or No, but I suppose it's a column as well?

Anonymous
Not applicable

Hi @SkiDK 

Thank you for the help 🙂

 

For example: The user will select a 'category' (GTM, brandbuilding etc) in dropdown1 (these are column names on my excel table) and also the user will select either 'yes' or 'no' from dropdown2. I then need to search the table returning names that match the search. 

 

NameGTM Brand Building Brand ManagementNPI
ChrisYesNoYesNo
AdamYesYesYesNo
SteveYesNoNoNo
JohnNoNoYesYes

 

 

Oh, the formula is going to be a bit different because I thought that your different categories where in a column named 'Category'. Since you have different columns on each category, you'll have to filter differently.

You'll kind of want to do something like this, where you check on the column name which is selected in the first dropdown where the value matches that of the selected in the second dropdown.

 

Filter(DATASCOURCE_TABLE, DropDown1.Selected.Category = DropDown2.Selected.Choice).Name

 Although I'm not sure this will work for finding the correct column name, because the selected item might not be recognized as a valid parameter.

 

The difficult part is that on the categories you search, they actually are column names and not integral data on which to filter the data. If above code does not work, you'll have to find a way to get the columnname that matches the dropdown, on which you're then going to filter your data.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,568)