Forum Discussion

chudson002's avatar
chudson002
Brass Contributor
Dec 07, 2021

GALLERY COUNT

 

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

(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)

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

 

 

 

 

 

  • 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
  • chudson002's avatar
    chudson002
    Brass Contributor

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

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

    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's avatar
      chudson002
      Brass Contributor

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

       

       

      • chudson002's avatar
        chudson002
        Brass Contributor
        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

Resources