web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update SharePoint fiel...
Power Automate
Unanswered

Update SharePoint field using REST api (BadGateway)

(0) ShareShare
ReportReport
Posted on by 2,563

Hi

 

I have been updating some SharePoint columns/fields using REST api, and everything works, except if the list has minor and major version activated. Then i will get the error

 

"message": "Additions to this Web site have been blocked.\n\nPlease contact the administrator to resolve this problem.
 
If i check out and check in the file when the flow is running then it will work, but if i use check out and check in function in the flow then it fails again with the same error message.
 
2019-11-08 09_00_25-Edit your flow _ Power Automate.png
 
 
Categories:
I have the same question (0)
  • v-litu-msft Profile Picture
    on at

    Hi @JimmyWork,

     

    Please try to update the item using the following method:

    Annotation 2019-11-11 094707.png

     

     

    Headers:

    accept: application/json;odata=verbose

    content-type: application/json;odata=verbose

    X-HTTP-Method: MERGE

    IF-MATCH: *

     

    body:

    {

    '__metadata': { 'type': 'SP.List' },

    'columnName': 'New value',

    }

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • JimmyW Profile Picture
    2,563 on at

    @v-litu-msft 

    Thank you, the issue is that i do not want to create a new version when i update the column. That is why i use the way i do. I will try what you posted but it will result in a new version being created of the item.

     

    I should add that my column is a "choice" column and not a single line column

  • JimmyW Profile Picture
    2,563 on at

    @v-litu-msft As im using a choice column that i want to update your solution wont work. I also wish to update the column without adding a new version if possible. It seems this worked before but currently not anymore, not sure why?

  • v-litu-msft Profile Picture
    on at

    Hi @JimmyWork,

     

    If it is a choice type, you can refer to the following:

    {'__metadata': { 'type':'SP.ListItem' }, 
    'TestColumn': { '__metadata': { 'type' : 'Collection(Edm.String)', results: ['Test1']}}}

    When versioning is enabled, versions are created in the following situations:

    • When a list item or file is first created or when a file is uploaded.

      Note: If file checkout is required, you must check the file in to create its first version.

    • When a file is uploaded that has the same name as an existing file.

    • When the properties of a list item or file are changed.

    • When an Office document is opened and saved. After a document is opened again, a new version will be created after an edit is saved.

    • Periodically, when editing and saving Office documents. Not all edits and saves create new versions. When saving edits frequently, for example, each new version captures a point in time rather than each individual edit. This is common when autosave is enabled.

    • During co-authoring of a document, when a different user begins working on the document or when a user clicks save to upload changes to the library. 

    There can be up to three current versions of a file at any given time: the checked-out version, the latest minor or draft version, and the latest published or major version. All other versions are considered historical versions. Some current versions are only visible to users who have permissions to view them.

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • JimmyW Profile Picture
    2,563 on at

    @v-litu-msft Thank you for helping me out.

    When i try your part now i get:

     

    A collection was found without the 'results' property. In OData, each collection must be represented as a JSON object with a property 'results'
     
    The "bNewDocumentUpdate": true would update the item without adding a version to it even if you change a column status.
  • v-litu-msft Profile Picture
    on at

    Hi @JimmyWork,

     

    After you update it via API, you can use the Get item action to get the whole collection.

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard