cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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

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

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

It worked! Thanks

Anonymous
Not applicable

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

 

thank you!

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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,539)