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

Using Drop down in a screen to filter a data table - not filtering

Hi. I have a table of 5 fields, and I'd like to use my drop down (not in datacard) to filter on a specific value in that first field in the table..

The field name is CableNumber

 

in the dropdown, the data showing all distinct cable numbers, works great as expected.

But when I try to connect to that data table to show only that specific cable number I choose, it ignores my code and doesn't work.

 

Some context:

The dropdown is named CableDD.  The table is named 'Master Cable List'.  The field is called CableNumber

 

The following is the code showing filters that don't work.  I've tried many iterations of this and nothing works.  Here is my code with 4 lines of failed attempts

 

Note: From the OnSelect Action (note: doesn't work in the OnChange Action either):

 

Filter('Master Cable List',CableNumber = CableDD.selected.value)

Filter('Master Cable List',CableDD.selected.value = CableNumber)

Filter('Master Cable List',CableNumber = CableDD)

Filter('Master Cable List',CableDD = CableNumber)

 

I'm stumped and I'm betting this is easy and I'm just missing something simple?

1 ACCEPTED SOLUTION

Accepted Solutions
BitLord69 Power Participant
Power Participant

Re: Using Drop down in a screen to filter a data table - not filtering

You have to set the Filter in the Items property of the Data table, not in any of the the drop down's properties.

 

Good luck!

View solution in original post

5 REPLIES 5
BitLord69 Power Participant
Power Participant

Re: Using Drop down in a screen to filter a data table - not filtering

You have to set the Filter in the Items property of the Data table, not in any of the the drop down's properties.

 

Good luck!

View solution in original post

Anonymous
Not applicable

Re: Using Drop down in a screen to filter a data table - not filtering

Thanks for your advice Bill.  Sounds like I have to write it so that if nothing is chosen in the text box, show all data, else show the data based on the choice in the drop down.

 

In the data table I currently have this code to show all the values from the table:
'Master Cable List'

How would I design/write the code in the items section to say  

"iif(drop down is blank, show the entire dataset, else show only data based on what is chosen in the dropdown)"

 

Thanks for your help! 

 

Anonymous
Not applicable

Re: Using Drop down in a screen to filter a data table - not filtering

It worked! Thanks

Anonymous
Not applicable

Re: Using Drop down in a screen to filter a data table - not filtering

Hi Steven, can you give the details on how to do this? I'm currently having the same problem

 

thank you!

akosiwong
Regular Visitor

Re: Using Drop down in a screen to filter a data table - not filtering

HI,

 

I have similar problem, the difference is, the selected item from the previous form will be the filter

 

thanks,

Gilbert

Thanks,
Gilbert

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (8,014)