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 Automate / Cannot Patch to ShareP...
Power Automate
Answered

Cannot Patch to SharePoint Multi Choice Column using HTTP Request

(0) ShareShare
ReportReport
Posted on by 97
Hi all,
 
Im going round and round in circles trying to figure this out, Everything works except the multi choice field call Activites.
 
Im getting this error every time:
 
Found a node of type 'PrimitiveValue' when starting to read the property value; however, a node of type 'StartObject' was expected. The '__metadata' property must have an object value.
 
Any help will be appreciated!
 
Categories:
I have the same question (0)
  • Suggested answer
    JD1010 Profile Picture
    2 on at
    Hi Jemma,

    I think your JSON object for the Activities field wasn't closed/formed properly.

    "Activities": {"__metadata": { "type": "Collection(Edm.String)"},
    "results": ["Civil Works"] }


    The { and } in bold is what was missing, I think. The above is taken from a test flow I built to replicate the problem. Give it a try.
  • eliotcole Profile Picture
    4,390 Moderator on at
    For one, you appear to be sending a 'POST' ...
     
    ... but ... either way ... if you want to simplify your JSON body, change your Content-Type / Accept to:
    application/json; odata=nometadata
    I had read this that you were trying to alter the available options in a choice for some reason ... and that would require a call to the 'fields' endpoint, I think.
    Either way ... you might find that once you're using a less 'verbose' model that you may be able to use 'PATCH' ... ... ... Even so ... if you want a REALLY easy way to either create / update a list item ... then ... just use the normal SharePoint Create / Update actions, but instead of selecting the list from the dropdown, use a custom value, and recall the List ID from somewhere else.
     
    Now you can add only the fields that you need to add, and when adding to a choice column use:
    {
      "ChoiceColumn": {
        "Value": "Choice"
      }
    }
     
  • JemmaKSS Profile Picture
    97 on at
    Hi,
     
    Thank you for your responses :)
     
    So I tried changing the headers to nometadata, still got this error:
     
    {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"The property '__metadata' does not exist on type 'SP.Data.Telco_x0020_HSE_x0020_DocumentsItem'. Make sure to only use property names that are defined by the type."}}}
     
    removed the metadata from the top of the body, got this error:
     
    {"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"An unexpected 'StartObject' node was found when reading from the JSON reader. A 'StartArray' node was expected."}}}
     
    I then tried using the Update file properties and putting the item details into the 'item' field and it times out with this error:
    "innerError": {
                    "status"500,
                    "message""Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'System.Collections.Generic.IEnumerable`1[Microsoft.SharePoint.Connector.SPListExpandedReference]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath 'Value', line 2, position 10.\r\nclientRequestId: f49a8458-fa59-4407-861d-9eda036e4738\r\nserviceRequestId: 5879a9a1-2009-5000-4252-56a9c9d19f1c"
                }
     
     
    That current outputs in the value is a compose of a select, ive tried wrapping it in json and that fails as well. 
     
    I need the site name and library to be dynamic, this is what I mean by going around in circles. I can get everything to accept in the http request but the moment i add the choice column I get errors, same in the update file properties
     
     
  • Verified answer
    JemmaKSS Profile Picture
    97 on at
    Ok!
     
    After a few more rounds, it seems that Sharepoint had created my column as a lookup column even though it wasn't, I removed the column and readded it and now it all works.
     
    Thank you for your help
  • eliotcole Profile Picture
    4,390 Moderator on at
    Hi, @JemmaKSS, sorry for a simple question ... but have you tried with a check-out action and check-in action before and after the update action?
  • Verified answer
    JemmaKSS Profile Picture
    97 on at
    Hello @eliotcole,
     
    I've got it working now using the tailored update file properties function, turns out MS had created the column as a lookup in the background even though it was a choice column on the front, wasn't until I looked deep into the output of a get item properties that I found this out. Once I removed the column and readded it again it fixed itself. Was so strange, it was clearly a choice column with two choices but the back end looked like a lookup with ids etc.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard