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 / Write value of check b...
Power Apps
Answered

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,903 Super User 2026 Season 1 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard