web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Answered

Gallery Filter

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have Gallery 1; CertsandQuals.

 

I am using the following formulate to set the default of a 'Status' toggle control. The following is working.

!IsBlank(LookUp(ECMmbrCQSmryGallery_1.AllItems,CQTitle="Firefighter I" || CQTitle="Firefighter II")) && (CountRows(ECMmbrCQSmryGallery_1.AllItems) = CountRows(Filter(ECMmbrCQSmryGallery_1.AllItems, ComplianceLabel_1.Text = "Compliant" || ComplianceLabel_1.Text = "Certified")))

 

In Gallery 1, below, because the Member profile shows less than five (5) items the toggle control should default to 'Inactive' after the data loads.

 

In order for the Member to be 'Active' the Gallery MUST have no fewer than the following five (5) 'items':

"Medical", "Fitness Test", "Live Fire Refresher", "Self-Contained Breathing Apparatus Fit Test", and EITHER "Firefighter I" or "Firefighter II". Without all five (5) items the Member is 'Inactive'. Also, inactivity can be based on 'Noncompliance'. Consequently, the existing formula and the new requirement need to all be in the new formula. 

 

Gallery.PNG

 

1. If ANY CertQualTitle shows 'Noncompliant' - Toggle Control default: 'Inactive'

 

2. If less than five (5) CertsQualsTitle items appear in Gallery 1 (regardless of titles) - Toggle Control default: 'Inactive'

 

3. If at least five (5) CertsQualsTitle items appear and the five ARE ONLY "Medical", "Fitness Test", "Live Fire Refresher", "Self-Contained Breathing Apparatus Fit Test", and EITHER "Firefighter I" or "Firefighter II", and ALL of the five (5) show 'Compliant' - Toggle Control default: 'Active'

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous :

    According to your description, the condition for toggle to be true is:

    • The value of'Compilance Status' of all records in the Gallery1 is "Noncompliant"
    • The value of CQTitle with more than 5 records in Gallery1 is one of "Medical", "Fitness Test", "Live Fire Refresher", "Self-Contained Breathing Apparatus Fit Test", "Firefighter I", "Firefighter II"]

    If so,plese try this code:

    CountRows(Gallery1.AllItems,CQTitle in ["Medical","Fitness Test","Live Fire Refresher","Self-Contained Breathing Apparatus Fit Test","Firefighter I","Firefighter II"])>=5 && 
    IsBlank(LookUp(Gallery1.AllItems,'Compilance Status'="Noncompliant"))
    

    Best Regards,

    Bof

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I worked it over a bit.

     

    The below appears to be working, for now.😎

     

    CountRows(ECMmbrCQSmryGallery.AllItems.CQTitle) >=5 && IsBlank(LookUp(ECMmbrCQSmryGallery.AllItems, ComplianceLabel_1.Text="Noncompliant"))

     

    Thank you,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard