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 / Error while Patching S...
Power Apps
Answered

Error while Patching SQL Server BadGateway

(0) ShareShare
ReportReport
Posted on by 15

Hello.

I am facing really annoying problem and I spend so much time trying to fix this and I still don't know what is the issue. 

As in subject: I am trying to use Patch() function to add and update SQL Server rows. Everything works fine for SharePoint lists, but here I keep getting error AFTER clicking button. I tried looking up this problem and I tried already reconnecting to SQL Server, reloading app and it still doesn't work. In Playload everything seems fine...

"An error occurred on the server. Server Response: *table name* failed" : BadGateway"

 

artenike_0-1658854993107.png

 

artenike_3-1658855019894.png

 

 

artenike_4-1658855029994.png

 

 

 

Categories:
I have the same question (0)
  • Akash17 Profile Picture
    Super User 2024 Season 1 on at

    Hi @artenike 

    In your patch there is value: Value(txtinput.txt) just remove the Value() from if it is datepicker field
    If it is not datepicker field still once you can try with Value: (.....).value 

    Also just check your connector whether it is properly connected to the gateway and other stuff
    Let me know if it is working after trying this

  • artenike Profile Picture
    15 on at

    Hi @Akash17 ! Thank you so much for your reply. It is Number field so when I delete "Value" function I'm getting "The type of this argument 'Value' does not match expected type 'Number'" error.

    "(...).Value" is not available (tbh even after deleting this whole column from Patch() it keeps showing Bad Gateway error.

    Connector should be ok since I can view this table in gallery with no problem. I used SQL Server Authenntication, where Gateway itself isn't required. Should I install specified one to insert/ update and delete rows into SQL Server? (The same problem while using Azure Authenticaiton in connector)

  • Verified answer
    artenike Profile Picture
    15 on at

    Solved. Problem was that this table was data pool on Synapse and Power Apps can show Synapse tables but if you try to insert/update/delete it shows Bad Gateway Error. I recommend using following workaround in this situation: Power Automate Flow executing insert/update/delete procedure with Azure SQL Data Warehouse.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard