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 / Updating multichoice c...
Power Automate
Unanswered

Updating multichoice column with http request

(0) ShareShare
ReportReport
Posted on by 44

Hi,

I am using the below action to update a Risk, the problem is with the "Effects" multichoice column:

Effects.png

 

The value of the "Effects" variable is:

[
{
"Value": "Cost"
},
{
"Value": "Quality"
},
{
"Value": "Benefits"
}
]

And in the action is used as shown in the screenshot:

"Effects": {
"__metadata": {
"type": "Collection(Edm.String)"
},
"results": @{variables('Effects')}
},

But keep on getting this error:

{
  "status": 400,
  "message": "An unexpected 'StartObject' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.\r\nclientRequestId: xxx\r\nserviceRequestId: xxx",
  "source": "https://xxx.sharepoint.com/sites/xxx/xxx/_api/web/lists/getbytitle('Risks')/items",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}

 

The column setting are:

column.png

 

Any hint would be much appreciated!

 

 

 

 

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Ximo,

     

    You want to update an existing list item, correct? In that case I would change a couple of things. 

    - In the uri you are missing the list item id

    - I would add the X-HTTP-Method and If-Match keys to the Headers

    - In the body you only need to include the fields you want to update

    - You can actually use the names of the choice options in the results property

     

    Below is an example

    I am updating a Risk list item with ID 6

     

    _api/web/lists/getbytitle('@{variables('ListName')}')/items(6)

     

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose",
     "If-Match": "*",
     "X-HTTP-Method": "MERGE"
    }

     

    { 
    "__metadata": { "type": "SP.Data.RisksListItem" },
    "Title": "Test", 
    "Effects": {
    "__metadata":{"type":"Collection(Edm.String)"},
    "results":["Cost","Quality","Benefits"]
    }
    }

     

    updatechoiceitems.png

  • Verified answer
    Ximo Profile Picture
    44 on at

    Hi @Expiscornovus,

    thank you for replying!

     

    This action runs inside a "For each" as I am copying Risks from one source site to another target site, so firstly we get the Risks from the source and for each Risk in the source we create a Risk in the target.

     

    The action started to work the moment I changed the variable value from:

    [
    {
    "Value": "Cost"
    },
    {
    "Value": "Quality"
    },
    {
    "Value": "Benefits"
    }
    ]

     

    To:

    [

      "Cost",

      "Quality",

      "Benefits"

    ]

     

    Mistery solved!💪

    Cheers!

     

  • SL84 Profile Picture
    7 on at

    I've been searching for 2 days!  I manually changed the flow for testing to remove the "Value" and boom! no more errors! Thank you!

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