cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IPC_ahaas
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,019)