cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

How to filter gallery list based on button click

Hi everyone, I have created a Claims Management mobile based application using powerapps that collects the data to Sharepoint list. The problem that im facing right now is the filtering part where i have to filter my gallery list based on button click. I want my gallery list to show the claim request based on the claim type which is(Transportation, Phone Bill and Medical) and also all(means all my 3types of claim together) but i've failed to do so. I have a problem in displaying all my claims but i could view if each of the claim type is selected. I have attached the screenshot of the nessecary information screen. How do i get this right? Can anyone help me with this? All help will be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
panand99
Level 10

Re: How to filter gallery list based on button click

Hey @Anonymous 

 

You can create a local variable on each button click - UpdateContext({varSelection:Transportation})

and on Screen OnStart- UpdateContext({varSelection:ALL})

and then on gallery items: 

 

if(varSelection="ALL",Requests,filter(Requests,RequestType=varSelection))

 

* Here "Requests" is the sharepoint list

 

Please accept this as a solution if it fulfill your requirement

 

View solution in original post

2 REPLIES 2
panand99
Level 10

Re: How to filter gallery list based on button click

Hey @Anonymous 

 

You can create a local variable on each button click - UpdateContext({varSelection:Transportation})

and on Screen OnStart- UpdateContext({varSelection:ALL})

and then on gallery items: 

 

if(varSelection="ALL",Requests,filter(Requests,RequestType=varSelection))

 

* Here "Requests" is the sharepoint list

 

Please accept this as a solution if it fulfill your requirement

 

View solution in original post

Anonymous
Not applicable

Re: How to filter gallery list based on button click

Thank you. It works perfectly right now. 

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
Users Online
Currently online: 326 members 5,724 guests
Please welcome our newest community members: