web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Write value of check b...
Power Apps
Unanswered

Write value of check box to data source from gallery

(0) ShareShare
ReportReport
Posted on by 46

I have a gallery that is using SQL Server as it's data set.   I have a check box in the gallery that I would like to use to update the value in my sql table.  Is it possible to update a value in a gallery to sql?

Categories:
I have the same question (0)
  • Verified answer
    SpongYe Profile Picture
    5,603 Super User 2025 Season 2 on at

    Hi @Rawb 

     

    I would use the OnCheck or OnUncheck properties of the checkbox to update the value in your SQL table.

    SpongYe_0-1704409682258.png

    The code example:

    Patch(
     SQL, 
     ThisItem, 
     {YourColumnName: Checkbox1.Value}
    )

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

  • Rawb Profile Picture
    46 on at

    Hi SpongYe,

     

    First, thank you for your help.  It is very much appreciated. I am having some trouble with the code and it is not working.  Here is what I wrote:

    Patch(
     '[wom].[tblWorkOrderManagement-Final]', // This is the table name of my sql table
     ThisItem
     {ParkedDiscussed: chkDiscussed.Value} //ParkedDiscussed = my column name in the table, chkDiscussed = my checkbox name
    )

     I'm not sure what I am doing incorrect.  Any further help is much appreciated.

  • Rawb Profile Picture
    46 on at

    Thank you for your help SpongYe.  I got the syntax by playing around with it.  The following worked for me (this is on the uncheck event for those who may look at this example the oncheck you would change the value of "ParkedDisussed" to true):

     

    Patch (
     'wom.tblWorkOrderManagement-Final', //Name of the table
     ThisItem,
     {
     ParkedDiscussed: false //Column Name to update and the value to make the column
     }
    )

     

    Again many thanks!

     

    Rawb

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard