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 / Checkboxes check/unche...
Power Apps
Answered

Checkboxes check/uncheck Update patch

(0) ShareShare
ReportReport
Posted on by Super User 2024 Season 1

Hello everyone, I am trying to make a gallery and insert checkbox also one outside checkbox so the thing I wanted to do is when I select the checkbox single line data I can have a button to patch that selected record or if I select outside checkbox to select all record and when press the button to patch only updated changes, my data is on SharePoint Thank you

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,925 on at

    @Ramole  consider this :

    Patching on single select of the checkbox, put this code on the OnCheck of the checkbox inside the Gallery. 

    That is if the checkbox outside the Gallery is not checked.

     

    If(
     !CheckboxOutside.Value,
     Patch(
     MyFirstList,
     LookUp(
     MyFirstList,
     ID = ThisItem.ID
     ),
     {
     Title: TextInput2.Text,
     FirstName: TextInput1.Text
     }
     )
    )

     

    If the checkbox outside is checked, then all the checkboxes inside the Gallery would apply therefore this second formula would be use instead:

     

    When you want to patch multiple items after multiple checkboxes have been ticked, Onselect of the Button:

    ForAll(
     RenameColumns(
     BrowseGallery1.AllItems,
     "ID",
     "NewID"
     ),
     If(
     Checkbox1.Value,
     Patch(
     MyFirstList,
     LookUp(
     MyFirstList,
     ID = NewID
     ),
     {
     Title: TextInput2.Text,
     FirstName: TextInput1.Text
     }
     )
     )
    )


    Am assuming you already have a way of checking all checkboxes inside the Gallery
    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @eka24 

    How can I make when the outside checkbox selected to control inside checkbox so i have ability to uncheck and check from outside checkbox please let me know how 

     

    Thanks 

     

     

    thanks 

  • eka24 Profile Picture
    20,925 on at

    In the Default of the Checkbox inside the Gallery, put;

    OutsideCheckbox.Value

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @eka24 

     

    How about when I Patch to deselect all check box after the patch please 

     

    Thanks 

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Reset the Checkbox at the end of your code: Reset(OutsideCheckbox)

    ForAll(
     RenameColumns(
     BrowseGallery1.AllItems,
     "ID",
     "NewID"
     ),
     If(
     Checkbox1.Value,
     Patch(
     MyFirstList,
     LookUp(
     MyFirstList,
     ID = NewID
     ),
     {
     Title: TextInput2.Text,
     FirstName: TextInput1.Text
     }
     )
     )
    );
    Reset(OutsideCheckbox)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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,041

#2
11manish Profile Picture

11manish 676

#3
Valantis Profile Picture

Valantis 655

Last 30 days Overall leaderboard