Hi,
I Have add some buttons to filter the SP List items based on selection of status buttons.
Can some help me how to to filter with logic
Gallery Name 'CMM Inspection Request Form'
Kindly see the pic enclosed pic for more information.
Thanks
Sunil
Solved! Go to Solution.
Yes, I would be happy to help here.
The All Request button needs this code in the OnSelect property
Set(showAll, true);
Each button should have code like this in the OnSelect property.
Set(showStatus, "New"); Set(showAll, false);
Set(showStatus, "In-progress"); Set(showAll, false);
Set(showStatus, "On Hold"); Set(showAll, false);
Set(showStatus, "Completed"); Set(showAll, false);
The final step depends on whether your Status column is a 'single line text' type or a 'Choices' type in SharePoint.
If Status is a single line text type put this code in the Items property of your gallery.
Filter(your_datasource_name, Status = showStatus Or showAll = true)
If Status is a choices type put this code in the Items property of your gallery.
Filter(your_datasource_name, Status.Value = showStatus Or showAll = true)
Now the buttons can be pressed to filter the gallery.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
The simplest way in my view is to replace the buttons with a one combobox1.
On the items of the combobox1 put: Distinct(Datasource,StatusColumn)
Then on the Gallery items put: Filter(Datasource,StatusColumn=combobox1.Selected.Result)
With this, when completed is selected, only completed would be seen.
Yes, I would be happy to help here.
The All Request button needs this code in the OnSelect property
Set(showAll, true);
Each button should have code like this in the OnSelect property.
Set(showStatus, "New"); Set(showAll, false);
Set(showStatus, "In-progress"); Set(showAll, false);
Set(showStatus, "On Hold"); Set(showAll, false);
Set(showStatus, "Completed"); Set(showAll, false);
The final step depends on whether your Status column is a 'single line text' type or a 'Choices' type in SharePoint.
If Status is a single line text type put this code in the Items property of your gallery.
Filter(your_datasource_name, Status = showStatus Or showAll = true)
If Status is a choices type put this code in the Items property of your gallery.
Filter(your_datasource_name, Status.Value = showStatus Or showAll = true)
Now the buttons can be pressed to filter the gallery.
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Thanks a lot, it;s works perfect...
Once quick question,
after applying all the formula, in gallery it;s not showing all time until we click All buttons. but still it;s calculating the total number of line items. Can you please suggest me how to enable all items must visible on gallery when we open the apps. based on that list it should filter when click the respective button.
Along with existing status filter i need to add text search based on part number. to search the part number i was using (Filter('CMM Inspection Request Form',StartsWith(Part_x0020_Number,TextInput_PartNumber.Text),
Status filter Gallary code is - Filter('CMM Inspection Request Form', Status.Value = showStatus Or showAll = true)
can you suggest me how to combine both filters for same gallery ,
Thanks
Sunil
s,
Sunil
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
200 | |
184 | |
69 | |
43 | |
34 |
User | Count |
---|---|
340 | |
266 | |
113 | |
65 | |
64 |