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 / Submit button only ena...
Power Apps
Answered

Submit button only enabled when all checkboxes in gallery is checked

(0) ShareShare
ReportReport
Posted on by 4

Hi Guys

 

I have a gallery of checkboxes ( not using forms) with the  associated questions and a submit button ( outside the gallery) That I only want enabled when all when all the check boxes  are ticked in the gallery. I am struggling a bit on the syntax for the submit  buttons   display mode , any help much appreciated.

 

Thanks in advance

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @trev_2000 that is possible with the code below:

     

    If(
     CountRows(Gallery1.AllItems) = CountRows(
     Filter(
     Gallery1.AllItems,
     Checkbox2.Value
     )
     ),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

    Replace Gallery1 and Checkbox2 with the actual names of your controls.

     

    If you have multiple checkboxes for each item and all checkboxes of all items need to be selected, you can expand the query below:

    If(
     CountRows(Gallery1.AllItems) = CountRows(
     Filter(
     Gallery1.AllItems,
     Checkbox2.Value && Checkbox3.Value && Checkbox4.Value
     )
     ),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

    If only one of the checkboxes of each Item needs to be checked, swap && with ||

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • RobElliott Profile Picture
    10,527 Super User 2026 Season 2 on at

    For the submit button, make sure it's outside the gallery then use something like this for the DisplayMode:

    If(cbConfirm.Value =true && cbAgree.Value =true,DisplayMode.Edit, DisplayMode.Disabled)

     

    Rob
    Los Gallardos

  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @RobElliott, thanks for replying.

     

    However, won't referencing a gallery item checkbox from outside the gallery return true as soon as one checkbox in the gallery is checked instead of when all items are checked?

  • RobElliott Profile Picture
    10,527 Super User 2026 Season 2 on at

    Yes you're right, my mistake, the app I was working on has multiple checkboxes which must all be checked for the save button to be in edit mode, but they are not in a gallery.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 421 Most Valuable Professional

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard