Announcements
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?
Hi @Rawb
I would use the OnCheck or OnUncheck properties of the checkbox to update the value in your SQL table.
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! 🍻
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.
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 404
timl 344 Super User 2026 Season 1
WarrenBelz 320 Most Valuable Professional