cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevenT
Level: Powered On

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
Super User
Super User

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
Super User
Super User

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

StevenT
Level: Powered On

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! 

 

StevenT
Level: Powered On

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!

Highlighted
akosiwong
Level: Powered On

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 305 members 4,518 guests
Please welcome our newest community members: