cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
zapperrr
Helper I
Helper I

DataTable Filtering with Dropdown

Hi all,

 

I had a question in regards to my datatable and the dropdown filter. I have a datatable that showcases numerous columns and rows, however with filtering using a dropdown box, I'd like there to be a blank value that shows all rows in the table.

 

Here's what I have on my datatable:

Filter('IT Equipment List',textInputSearch.Text in User, ModelInput.Text in Model, SInput.Text in 'Serial Number', 'Equipment Type'.Value = Dropdown1.Selected.Result)

 

Here's what I have on my dropdown:

Distinct('IT Equipment List', 'Equipment Type'.Value)

 

If I try to AllowEmptySelection, nothing shows up on the table. I'd simply like there be a blank dropdown value so I can see all the items.

1 ACCEPTED SOLUTION

Accepted Solutions
Drrickryp
Super User
Super User

@zapperrr 

Interpreting your requirements literally:

 

If( 
   Dropdown1.Selected.Result=Blank(), 'IT Equipment List',
   Filter(
         'IT Equipment List',textInputSearch.Text in User, 
          ModelInput.Text in Model, 
          SInput.Text in 'Serial Number', 
          'Equipment Type'.Value = Dropdown1.Selected.Result
  )
)

 

 

View solution in original post

4 REPLIES 4
AhmedSalih
Super User
Super User

Hello, @zapperrr , try this for your DataTable Items property:

 

Filter('IT Equipment List',textInputSearch.Text in User, ModelInput.Text in Model, SInput.Text in 'Serial Number',   IsBlank(Dropdown1.Selected.Value) || IsEmpty(Dropdown1.Selected.Value) || 'Equipment Type'.Value in Dropdown1.Selected.Result)

 

 

 

If my reply helped you, please give a 👍 , & if it solved your issue, please 👍 & Accept it as the Solution to help other community members find it more.


I am primarily available on weekdays from 6-10 PM CT and 5-10 PM CT on weekends.


Visit my Blog: www.powerplatformplace.com


 

 

 

Thanks for the response! 

This did not work and it just blanked out the Datatable. With that, is there also the possibility to add a blank value in the dropdown box choices to show all items in the list?

Drrickryp
Super User
Super User

@zapperrr 

Interpreting your requirements literally:

 

If( 
   Dropdown1.Selected.Result=Blank(), 'IT Equipment List',
   Filter(
         'IT Equipment List',textInputSearch.Text in User, 
          ModelInput.Text in Model, 
          SInput.Text in 'Serial Number', 
          'Equipment Type'.Value = Dropdown1.Selected.Result
  )
)

 

 

This worked! Thank you very much, I see what I didn't do originally when attempting it on my own. However, when searching with my other filters, it doesn't filter unless something is chosen on the dropdown. Is there a way to go about that?

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,417)