I created these filter btns: New | Pending | Completed
Each one of them filters the gallery and show the corresponding item(s)
All the filter btns are set to variables Set(varFilter,"New") | Set(varFilter,"Pending") | Set(varFilter,"Completed")
1. How do I set the Show All tab to show all the (New, Pending & Completed) items.
Note: when I log in afresh, it shows all the items but after clicking on the New, Pending & Completed tab, I need to find a way to return all of them showing on the screen all again.
2. How do I code gallery count for each tab selected? Say for instance, if there are just 2 New items, 3 Pending Items and 4 Completed items respectively, when I click on the New, I should see a label by the side showing the total number of item selected.
Onload of the screen, all the items show
Solved! Go to Solution.
Try something like:
SortByColumns( If( IsBlank(varFilter), Filter( 'MyDataSource', TextSearchBox1_1.Text in Recipe || TextSearchBox1_1.Text in 'Batch No' || TextSearchBox1_1.Text in Date || TextSearchBox1_1.Text in Operator ), If(varFilter = "All",'MyDataSource', Filter('MyDataSource', 'Slury Status'.Value = varFilter)) ),"Created", If( SortDescending1, Ascending, Descending ) )
If I understood , you want show all items what mean no filtering.
in show all button you can do like this: Set(varFilter,"All")
in gallery items (believe you are filtering by varFilter) you need to test
If(varFilter = "All", Datasource, Filter(Datasouce, Status = varFilter))
Thanks @Gochix ,
I don't understand what you mean by "gallery items code".
For the other btns (New, Pending and Completed, I used these to filter:
Set(varFilter,"New") | Set(varFilter,"Pending") | Set(varFilter,"Completed") and it's working for them.
Just the ShowAll that's the issue.
As for the CountRows... IT WORKED!!! Many thanks.
I applied it like this:
If(varFilter = "All", 'MyDataSource', Filter('MyDataSource', Status = varFilter))
But the last "=" on the line is showing error.
Hi @Virikefe22 ,
If(varFilter = "All", SPlist, Filter(SPList, status = varFilter))
status will be your column in your data source where status is stored as "New", "Pending" and "Completed"
I've checked the code at my end and the formula works. So if this doesn't work for you then you have to adjust it for your data source and column name.