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 / Server Response: Bad G...
Power Apps
Answered

Server Response: Bad Gateway Error while Patching the record

(0) ShareShare
ReportReport
Posted on by 61

Hi Everyone,

 

I am getting the Server Response, Bad Gateway error while updating the list item in SharePoint list. Please, take a look at the screenshot. I am patching back the data based on the Approval of the manager. 

 

I have done all the steps mentioned in the previous posts, but nothing works. 

 

mkhan73_0-1604344929506.png

 

Categories:
  • rsaikrishna Profile Picture
    3,703 on at

    @mkhan73 

     

    In the screen shot, I see DataCardValue2, DataCardValue3, DataCardValue7 and so on.

     

    Try using the value or Text property for them in the Patch command.

     

    Example: DataCardValue2.Text

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
  • WarrenBelz Profile Picture
    156,958 Most Valuable Professional on at

    HI @mkhan73 ,

    Two things, you are referring to text controls, not their content (you need DatacardValue1.Text and also what record are you patching to? If  new record try Defaults('Sector/Division Approval Status') as the fist item after the list name.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • mkhan73 Profile Picture
    61 on at

    @WarrenBelz @rsaikrishna, I removed those fields and I am still getting the same error. 

  • rsaikrishna Profile Picture
    3,703 on at

    @mkhan73 

     

    Can you share the screen with your updated formula now?

     

    Regards

    Krishna Rachakonda

    If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
  • Verified answer
    mkhan73 Profile Picture
    61 on at

    I got it working. I just had to remove the ID from one of the field. 

  • WarrenBelz Profile Picture
    156,958 Most Valuable Professional on at

    Hi @mkhan73 ,

    You also need to refer to the Id in the first patch as a number - it will not be in DataCardValue4 unless this is a drop-down, then it possibly would be

    Id:DataCardValue4.Selected.Id

    Try removing all items except on text item, then put them back one at a time until it stops working. Also did you read my comment on what you are patching (new record?) Also please post your code as Text.

     

  • mkhan73 Profile Picture
    61 on at

    @WarrenBelz yes, I am updating the record existing on the SharePoint list. 

  • Verified answer
    WarrenBelz Profile Picture
    156,958 Most Valuable Professional on at

    @mkhan73 ,

    You need to refer to the Item to be patched - for example if it was selected in a gallery

    Patch(
     ListName,
     {ID:GalleryName.Selected.ID},
     {Your Patch here}
    )
    

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • charterha17 Profile Picture
    4 on at

    Having the same issue with this patch:

     

      Patch(
                    EOS_Downtime_Schchg,
                    ThisItem,
                    {
                        Date: DTG_Date.SelectedDate,
                        Shift: If(
                            IsBlank(DTG_Shift.Selected),
                            {Value: DTG_Shift.SearchText},
                            DTG_Shift.Selected
                        ),
                        Type_: If(
                            IsBlank(DTG_Type.Selected),
                            {Value: DTG_Type.SearchText},
                            DTG_Type.Selected
                        ),
                        Reason: If(
                            IsBlank(DTG_Reason.Selected),
                            {Value: DTG_Reason.SearchText},
                            DTG_Reason.Selected
                        ),
                        Source: If(
                            IsBlank(DTG_Source.Selected),
                            {Value: DTG_Source.SearchText},
                            DTG_Source.Selected
                        ),
                        Part_Number: DTG_PartNumber.Text,
                        Minutes: Value(DTG_Minutes.Text),
                        Comments: DTG_Comments.Text
                    }
                );
    UpdateContext({EditMe: false})

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 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard