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.
Solved! Go to Solution.
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.
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.
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?
@IPC_ahaas where do you want to display the ItemDescription? Could you provide a screenshot of your app
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.
"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:
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:
I want DropItemChosenDescriptionExchange to display the ItemDescription from CHMerchandise.
EDIT: Forgot final line
You are referring to these as Dropdowns...are they dropdown controls or combobox controls?
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.
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?
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.
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |