cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IPC_ahaas
Post Patron
Post Patron

Drop down List from SharePoint List Filtering

I have a CHMerchandise List of products.

 

First column Title is the type of item.

Second column ItemDescription is the item description.

 

In the PowerApp:

First drop down is DrpItemChosenType with Items=Distinct(CHMerchandise,Title).

Second drop down is DrpItemList.

 

I want to have DrpItemList be a list of all items from CHMerchandise where the Title matches the selected DrpItemChosenType.

I can filter the second drop down:

 

Filter(
CHMerchandise,
Title = DrpItemChosenTypeExchange.SelectedText.Value,
)

 

but it its an empty list. I cannot see how to display the ItemDescription in the list with the filter.

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@IPC_ahaas 

Since your Items property of the first uses a Distinct function, you will need to filter using the Result property of that record.

So your formula should be:

Filter(CHMerchandise,
    Title = DrpItemChosenTypeExchange.Selected.Result
)

 

Avoid using the SelectedText property as it is deprecated.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

16 REPLIES 16
PowerRanger
Super User
Super User

@IPC_ahaas 

 

Use this filter expression instead:

Filter(
CHMerchandise,
Title = DrpItemChosenTypeExchange.Selected.Value,
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.
IPC_ahaas
Post Patron
Post Patron

Value is not an option for Selected, but Result is

 

 

Filter(
    CHMerchandise,
    Title = DrpItemChosenTypeExchange.Selected.Result
)

 

 

The list seems to be filtering appropriately, but how can I get it to display the ItemDescription?

PowerRanger
Super User
Super User

@IPC_ahaas where do you want to display the ItemDescription? Could you provide a screenshot of your app




​Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item.

If the content was useful in other ways, please consider giving it Thumbs Up.
RandyHayes
Super User
Super User

@IPC_ahaas 

Since your Items property of the first uses a Distinct function, you will need to filter using the Result property of that record.

So your formula should be:

Filter(CHMerchandise,
    Title = DrpItemChosenTypeExchange.Selected.Result
)

 

Avoid using the SelectedText property as it is deprecated.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

"Avoid using the SelectedText property as it is deprecated", thank you for that clarity. I've seen how to refer to the selected value of a drop down multiple ways in my research. 

 

Here's what the app looks like:

 

IPC_ahaas_0-1660831920623.png

 

DrpItemChosenTypeExchange has Items=Distinct(CHMerchandise,Title)

DropItemChosenDescriptionExchange has 

Filter(CHMerchandise,
    Title = DrpItemChosenTypeExchange.Selected.Result
)

 I can tell the number of items in DropItemChosenDescriptionExchange is correct based on my selection in DrpItemChosenTypeExchange, however they are all blank:

 

IPC_ahaas_1-1660832022525.png

 

I want DropItemChosenDescriptionExchange to display the ItemDescription from CHMerchandise.

 

EDIT: Forgot final line

RandyHayes
Super User
Super User

@IPC_ahaas 

You are referring to these as Dropdowns...are they dropdown controls or combobox controls?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
IPC_ahaas
Post Patron
Post Patron

They are drop down controls. I haven't used combo box controls, so I'm not sure when one should be used over the other.

RandyHayes
Super User
Super User

@IPC_ahaas 

A combobox is used (and should only be used) when searching or multiple selections are needed.  Dropdown controls do not allow those functions.

 

So what do you have in the Value property in the property pane?

RandyHayes_0-1660833300498.png

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
IPC_ahaas
Post Patron
Post Patron

Bingo, that was it. It was displaying some random column in the Value. I changed this to ItemDescription and it's working now. I assumed it was something in code.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,756)