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 Platform Community / Forums / Power Apps / Edit Toggle Control Co...
Power Apps
Answered

Edit Toggle Control Condition

(0) ShareShare
ReportReport
Posted on by 5,345 Moderator

I have Toggle.

 

I have a Gallery.

 

The Toggle is NOT in the Gallery.

 

The condition in the Toggle is determing compliance status.

 

One component of compliance is to have a 'Driver' document with an issue date within the passed 730 days. If no, 'Noncompliant'. The below already gets me that much.

 

After the 730 grace period the employee is ALSO required to have a 'Driver Renewal' with an issue date within the passed 730 days.

 

How do I edite the below to show these multiple conditions?

 

Condition 1: A 'Driver' doc ONLY, issued within the passed 730 days.

Condition 2 After 730 days a 'Driver' doc with any issue data AND a 'Driver Renewal' doc issued within the passed 730 days. 

 

The Toggle Default property has:

CountRows(Filter(Gallery3.Alltems, StartsWith(GalleryTitle.Text, "Driver")) >0 && (GalleryDateOfAward.Text + 730 > (Value(Today()))

Categories:
  • Verified answer
    rubin_boer Profile Picture
    4,843 Super User 2024 Season 1 on at

    hi @Phineas you made it clear the toggle is outside of the gallery, does this mean compliance in healthy if all the drivers complies and not if there is any one non-compliant right?

     

    Consider the table - this is noncompliant according to your rules

    rubin_boer_0-1620401921788.png

    The data source is a table with Title, Award date and Renewal date

    The gallery Items = 

    AddColumns(DataTable, "Duration", DateDiff(DateValue(AwardDate),Today(),Days),
    "Renewal Duration", DateDiff(DateValue(RenewalDate),Today(),Days))

     

    toggle Default = CountRows(Filter(YourGallery.AllItems, StartsWith(Title,"Driver"),Duration>730,'Renewal Duration'>730))= 0

     

    Based on you rruels the second check for 730 is after the first check - the filter sequence cater for this if its either of the two then it needs to be included as one condition with And or &&

    rubin_boer_1-1620402259559.png

    If all is good then you comply

    rubin_boer_2-1620402372956.png

     

    Hope this helps

     

     

     

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard