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

Filter Gallery based on dropdown selection

Hi,

 

I have a gallery ('HR01Gallery') pulling through SharePoint list data from a list named 'HR01'. This list contains a column named 'Form Status'. 

 

I have a dropdown list ('FormStatusDropdown') which connects to 'HR01' and displays the Value of the 'Form Status' column. The values in this column are either 'Submitted', 'Approved', or 'Rejected'.   

 

I'd like to be able to change the gallery items displayed based on the dropdown item selected. For example, if I select 'Approved' in the dropdown, the gallery only shows those records with a 'Form Status' of 'Approved'.

 

Can someone please kindly point me in the right direction? 

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-siky-msft
Microsoft

Re: Filter Gallery based on dropdown selection

Hi @Tricky778 ,

 

Could you share the items property of dropdown?

We can't give you the accurate expression, because it is up to the Items property of dropdown.

From my experience, there are about three possibilities: Dropdown.selected.Value , Dropdown.selected.Result or Dropdown.selected.'Form Status'. You can take a try.

Also I suggest you to type a " . " dot after 'Dropdown.selected' and try any autocomplete suggestion that appears.

 

Hope this helps.

Best regards,

Sik

—————————————————————

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

View solution in original post

7 REPLIES 7
cds
Level 8

Re: Filter Gallery based on dropdown selection

Filter(HR01, 'Form Status' = Dropdown.selected.value)

Highlighted
DisappointmentB
Level: Powered On

Re: Filter Gallery based on dropdown selection

Hello,

 

You can do this in a number of ways. One method is to use a Switch on the Items for the Gallery based on the Value of the drop down. Within each case statement you can create a filter formula that uses the Value. Another way is to simply create a filter statement in the items for the gallery that use the Value of the dropdown. e.g. Within the Filter put ddApprovedDropdown.Selected.Value

 

Hope this helps

Microsoft v-siky-msft
Microsoft

Re: Filter Gallery based on dropdown selection

Hi @Tricky778

 

If 'Form Status' column is choices type, please try this:

 

Filter(HR01, 'Form Status'.Value=FormStatusDropdown.Selected.Value)

 

 

Best regards,

Sik

—————————————————————

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

Tricky778
Level: Powered On

Re: Filter Gallery based on dropdown selection

Thanks @cds, but this doesn't seem to work, I perhaps should have mentioned that the column in SharePoint for 'Form Status' is a text field. At present it doesn't like the '=' or '.value' (see image attached). 

cds
Level 8

Re: Filter Gallery based on dropdown selection

well take off the .value and see what the intellisense suggests. 

 

 

Microsoft v-siky-msft
Microsoft

Re: Filter Gallery based on dropdown selection

Hi @Tricky778 ,

 

Could you share the items property of dropdown?

We can't give you the accurate expression, because it is up to the Items property of dropdown.

From my experience, there are about three possibilities: Dropdown.selected.Value , Dropdown.selected.Result or Dropdown.selected.'Form Status'. You can take a try.

Also I suggest you to type a " . " dot after 'Dropdown.selected' and try any autocomplete suggestion that appears.

 

Hope this helps.

Best regards,

Sik

—————————————————————

If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

View solution in original post

Tricky778
Level: Powered On

Re: Filter Gallery based on dropdown selection

Thanks Sik,

 

I used your guidance to come up with the string below which had the desired results:

 

Filter(HR01, 'Form Status'= FormStatusDropdown.Selected.'Form Status')

 

👍

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,815)