SOLVED

GALLERY COUNT

Brass Contributor

 

Good Day.  Was wondering if anyone could assist.  Have 2 galleries, when status is selected (top), it should filter the gallery below.

chudson002_2-1638895620499.png

(1) The count and items are correct, but when selecting the status, i.e Pending, gallery does not filter.

Count - Text: CountRows(Filter(TrainingTravel_1, Status = ThisItem.Filter && SupvrEmail = varUser.Email))

Items:  Table({Filter: "Pending"}, {Filter: "Approved"}, {Filter: "Disapproved"}, {Filter: "All"})

Gallery: Sort(Filter(TrainingTravel_1, SupvrEmail = varUser.Email), Start, Ascending)

 

(2) Filtering works when selected, but cannot get the count for "All" (same for above)

chudson002_1-1638895383065.png

Text: CountRows(Filter(TrainingTravel_1, Status = ThisItem.Filter && 'Created By'.Email = varUser.Email))

Items:  Table({Filter: "Pending"}, {Filter: "Approved"}, {Filter: "Disapproved"}, {Filter: "All"})

Gallery: Switch(
SelStatus_3.Selected.Filter,
"All",
TrainingTravel_1,
"Pending",
Filter(
TrainingTravel_1,
Status = "Pending"
),
"Approved",
Filter(
TrainingTravel_1,
Status = "Approved"
),
"Disapproved",
Filter(
TrainingTravel_1,
Status = "Disapproved"
),
Sort(Filter(TrainingTravel_1,'Created By'.Email = varUser.Email), Start, Ascending))

 

Thanks you for any assistance you can provide.

 

V/R

chudson002

 

 

 

 

 

3 Replies

CountRows(Filter(TrainingTravel_1, Status = ThisItem.Filter Or ThisItem.IsSelected && 'Created By'.Email = varUser.Email))

Got the aggregated number to appear, but.........

chudson002_1-1638923787276.png

when each button is clicked, the total will appear in current, when the next is clicked, the previous returns to correct number and the next displays total.

 

chudson002_2-1638923814090.png

 

 

Gallery (1) now displays the correct count when button is selected...still working on "All" to display "5".

 

chudson002_0-1638926130609.png

 

best response confirmed by chudson002 (Brass Contributor)
Solution
Was assisted with finding a resolve. The below worked great!

If(ThisItem.Filter = "All", CountRows(Filter(TrainingTravel_1, 'Created By'.Email= varUser.Email)), CountRows(Filter(TrainingTravel_1, Status = ThisItem.Filter && 'Created By'.Email= varUser.Email)))

V/R
chudson002
1 best response

Accepted Solutions
best response confirmed by chudson002 (Brass Contributor)
Solution
Was assisted with finding a resolve. The below worked great!

If(ThisItem.Filter = "All", CountRows(Filter(TrainingTravel_1, 'Created By'.Email= varUser.Email)), CountRows(Filter(TrainingTravel_1, Status = ThisItem.Filter && 'Created By'.Email= varUser.Email)))

V/R
chudson002

View solution in original post