cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Gallery Filter

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'

1 ACCEPTED SOLUTION

Accepted Solutions

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,

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @3csman :

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

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,

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (14,767)