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

Filtering via a dropdown menu errors

Details-

List name: FoodOption

Columns: Cat , ItemRef , Description , Price

 

I am trying to present details/description of an item when selected in a dropdown menu, I will have multiple of these for each 'cat' but they are standalone so won't affect each other.

For the dropdown menu I have: 

Filter(FoodOption,Cat="Refreshments").ItemRef

 

I was going to then use this result for the filter of a gallery view (Will only show one as the Itemref is unique) I feel I maybe going about filtering the gallery all wrong I was simply going to use a similar filter as above but reference the dropdown so:

Filter(FoodOption,ItemRef=Dropdown1    <- But at this part I see others use selected value but it doesn't work for me it says that isn't an option so I am left with 'Dropdown1' which comes up with "This data type is unsupported for evaluation"

 

Any nudges in the right direction?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Filtering via a dropdown menu errors

@RPWade 

If I understand you correctly, you have a dropdown that should have a filtered list of items from the FoodOption list based on the Cat column.  Then you want the details of that record to display in a Gallery.

 

If that is the case, then you might want to consider changing your DropDown Items property formula to something like this:

Filter(FoodOption, Cat="Refreshments")

In this case, your dropdown will now contain all the records that meet that filter.  You will want to, in the designer, change the Value property to the ItemRef value so that it is displayed in the dropdown.

 

Then for your Gallery, you will change the Items property to:  DropDown1.Selected

That is all you need to do.  Then in your Gallery, your labels or whatever you are using will reference - ThisItem.ItemRef,  ThisItem.Description,  ThisItem.Price, etc.

In this scenario, the Gallery is deriving its records from the selected Item in the DropDown filtered list.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Filtering via a dropdown menu errors

@RPWade 

If I understand you correctly, you have a dropdown that should have a filtered list of items from the FoodOption list based on the Cat column.  Then you want the details of that record to display in a Gallery.

 

If that is the case, then you might want to consider changing your DropDown Items property formula to something like this:

Filter(FoodOption, Cat="Refreshments")

In this case, your dropdown will now contain all the records that meet that filter.  You will want to, in the designer, change the Value property to the ItemRef value so that it is displayed in the dropdown.

 

Then for your Gallery, you will change the Items property to:  DropDown1.Selected

That is all you need to do.  Then in your Gallery, your labels or whatever you are using will reference - ThisItem.ItemRef,  ThisItem.Description,  ThisItem.Price, etc.

In this scenario, the Gallery is deriving its records from the selected Item in the DropDown filtered list.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

RPWade
Level: Powered On

Re: Filtering via a dropdown menu errors

I was massively over complicating things then wasn't I!

 

Also found out list changes seem to be pretty sensitive, as I am not sure why but I had to remove the Data source (tried refreshing) for the description to pull through.

 

Many thanks!

Super User
Super User

Re: Filtering via a dropdown menu errors

@RPWade 

It happens!  Number one rule with PowerApps - Keep it simple!  If you feel like you are "developing" then you might be overcomplicating.

 

As for datasources - you should only have to pull out datasources and add them back if you make structure changes to them.  Sometimes, depending on the change, a refresh from the DataSource list will work. Other times not.

 

If it is an issue with just updated data in your list, then the refresh from the list will work, but if you need something more from within the app, consider a button or other control with an action of Refresh(yourSource) to do the job.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,327)