cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andrasetof30
Frequent Visitor

PowerApps Filter and Search drop down DataTable

Hello,

I am a begginer user, trying to build an PowerApp. I added a DataTable, a textInputSearch and a dropDown1 filter Company.

When dropDown1 Filter Company is Blank, i want to display all Items from my list (NameList).  I want to search based on Title, and if i select a value from dropDown, i want to display that exact item(s) or if i select a value from dropDown1, i want to display all items from that company value.

My Company column is Choice type, but i have another column for company but it is Single line of text.

 

Can someone help me to understand what should i do?

 

I have tried this in DataTable - Items:

 

 

If(IsBlank(Dropdown1.Selected.Value), NameList, SortByColumns(Search(Filter(NameList,Company.Value = Dropdown1.Selected.Value), TextInput1.Text, "Title", , Ascending))

 

 

When i want to search, it doesnt display anything. Only when i select a company value, it will display result based on Search and DropDown.

How should i search and filter in those two cases? (choice and single line of text column)

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Gochix
Solution Sage
Solution Sage

@andrasetof30 ,

 

Try:

 

If(IsBlank(Dropdown1.Selected.Value), SortByColumns(Search(NameList, TextInput1.Text,"Title"),"Title",Ascending), SortByColumns(Search(Filter(TestingDB,Company = Dropdown1.Selected.Value), TextInput1.Text, "Company"),"Company", Ascending))

 

View solution in original post

4 REPLIES 4
Gochix
Solution Sage
Solution Sage

Hi @andrasetof30 ,

 

You had a mistake in your code.

 

If(IsBlank(Dropdown1.Selected.Value), NameList, SortByColumns(Search(Filter(NameList,Company = Dropdown1.Selected.Value), TextInput1.Text, "Title"),"Title", Ascending))

 

Yes, but if i search something, it is not working. Only if i search and select a value from drop down it is going to work. But i want searching to work when dropDown is Blank().

Hi @andrasetof30 ,

 

Try with below.

If(IsBlank(Dropdown1.Selected.Value), NameList, SortByColumns(Search(Filter(NameList,Company.Value = Dropdown1.Selected.Value), TextInput1.Text, "Title"),"Title", Ascending))

 

Please accept this as solution if it helped you, if it had helped you in some way, consider giving a thumbs up...

 

Cheers,

PMDY

Gochix
Solution Sage
Solution Sage

@andrasetof30 ,

 

Try:

 

If(IsBlank(Dropdown1.Selected.Value), SortByColumns(Search(NameList, TextInput1.Text,"Title"),"Title",Ascending), SortByColumns(Search(Filter(TestingDB,Company = Dropdown1.Selected.Value), TextInput1.Text, "Company"),"Company", Ascending))

 

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.

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 (3,108)