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

Filter on Gallery Items based on Buttons

Hello,

 

I am creating a power app with SharePoint List. I want to filter my list for one of column value. I created multiple buttons and want to retrieve data based on my button click. 

 

main.PNG

 

I have to a dropdown column naming Status in my list with various values such as Draft/ PD Check/ BA Check etc. I want to gat data with Status as Draft with my Button named Draft and so on for other.

 

I tried this formula for 1st case:

Gallery.Items: Filter(PID,StartsWith('PID Type'.Value, Dropdown1.Selected.ColumnStart) && If(Draft.AutoDisableOnSelect,StartsWith('PID Status'.Value, Draft.Text),true))

But it always shows data only with status draft.

 

Can someone help.

 

2 REPLIES 2
Community Support
Community Support

Hi @Anonymous ,

Could you tell me the relationship between the buttons and the drop down?
Whether do you want their relationship is "AND" or "OR" ?

For example, if you click "Draft" button and you choose "All" in drop down, what kind of data do you want to display?

Is 'PID Status' data type choice? single choice?
I assume that it is a single choice column.

I firstly made a test for only having some buttons to filter. (about the drop down, I need your answer)

1)insert some buttons.

2)set Draft button's OnSelect: 

Set(var,"Draft")

set PD Check button's OnSelect:

Set(var,"PD Check")

.....

Set the gallery's Items:

If(IsBlank(var)||var="All",PID,Filter(PID,PID Status'.Value=var))

Then the gallery's Items will filter based on the button that you click.

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Sorry for late reply.

 

Now, me requirement changed. I need to apply multiple filter with buttons only.

 

When I click the button I should get Item with status "Draft" and Item Type as "WLI".

 

Is it possible to apply multiple filter?

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (16,677)