Hello,
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")
Question:
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.
Ok now, I modified to "Status.Value" and the red-underline in the last "=" was cleared off. Meaning code is clean. But clicking on the button is still not doing anything when app is executed.
Here is what I did:
If(varFilter = "All", 'MyDataSource', Filter('MyDataSource', Status.Value = varFilter))
you can try a different approach like this.
Filter('MyDataSource', Status.Value = If(varFilter = "All", Status.Value, varFilter))
this should be in gallery items
can you share a screenshot of it?
Here's it... it's actually not showing any error anymore... code clean and this is applied to OnSelect of the ShowAll btn
Ok, I think I got it.
this code "Filter('MyDataSource', Status.Value = If(varFilter = "All", Status.Value, varFilter))" should be in the Gallery Itens properties and in the button you need just to put Set(varFilter,"All")
Ok, now I understand but add this to the Filter code to this gallery, it's showing error. Here is it:
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
),
Filter(
'MyDataSource',
TextSearchBox1_1.Text in Recipe || TextSearchBox1_1.Text in 'Batch No' || TextSearchBox1_1.Text in Date || TextSearchBox1_1.Text in Operator,
'Slury Status'.Value = varFilter
)
),
"Created",
If(
SortDescending1,
Ascending,
Descending
)
)
That's the default code, that's not throwing error.
Now, I tried to add this very line: "Filter('MyDataSource', Status.Value = If(varFilter = "All", Status.Value, varFilter))" but I get errors everywhere.
So kindly look into the above code (without errors) and add this "Filter('MyDataSource', Status.Value = If(varFilter = "All", Status.Value, varFilter))" to it let me apply and see how it goes.
Thanks
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
)
)
That! @Gochix It worked!!! Show All btn now works perfectly as desired.
Many thanks to you both @Gochix @Ricardo_Costa
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
139 | |
96 | |
83 |