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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,112)