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 / Patch command not refe...
Power Apps
Unanswered

Patch command not referencing TextInput for SQL

(0) ShareShare
ReportReport
Posted on by 1

All, 

 

I have an app where I am trying to write to my companies MYSQL Database from a galleryThe goal is to update an existing column in an existing table not add a record 

 

The Toggle control will write to the SQL database but the text input control with the code below will not. I can write to the SQL Table in the text box by using a literal, but I cannot write to the table when referencing a Text Input or Dropdown in the Patch command 

 

Toggle Control On check/Uncheck - 

Patch('[SDC].[ShobFabTracking]',First(Filter('[SDC].[ShobFabTracking]',Barcode=ThisItem.Barcode)),{FloorTrackingStatus:true})Power APps.PNG

 

TextInput Control (On Select) - 

Patch('[SDC].[ShobFabTracking]',First(Filter('[SDC].[ShobFabTracking]',Barcode = ThisItem.Barcode)),{BurnTableShelf: TextInput1.Text))})

Categories:
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    I don't know if it is a typo or if it is a syntax error but your Patch for the text input should look like this:

     

    Patch('[SDC].[ShobFabTracking]',
     First(Filter('[SDC].[ShobFabTracking]',Barcode = ThisItem.Barcode)),
     {BurnTableShelf: TextInput1.Text}
    )

    I think you can even make the code simpler since you are in a gallery. Try this:

    Patch('[SDC].[ShobFabTracking]', ThisItem, {BurnTableShelf: TextInput1.Text})

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard