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 a managed met...
Power Automate
Unanswered

Updating a managed metadata using Rest API with FieldName and FieldValue pair

(0) ShareShare
ReportReport
Posted on by

Hi, I got an existing managed metadata value (via Send HTTP request with GET method) and am trying to update one in the different list. I was able to do this when I use "Send HTTP request" like this:

httpPost_Regular.png

Body contents:
{
 "Division": {
 "Label": "@{outputs('HttpGet')?['body']?['d']['Division/Label']}",
 "TermGuid": "@{outputs('HttpGet')?['body']?['d']['Division/TermGuid']}",
 "WssId": @{outputs('HttpGet')?['body']?['d']['Division/WssId']}
 }
}

 

However, I couldn't figure out how to convert this to formValues (FieldName and FieldValue pair). This is what I tried but didn't work:

httpPost_formValues.png

Inputs in "Compose formValues"
[ 
 { 'FieldName': 'Division',
 'FieldValue': {
 "Label": "@{outputs('HttpGet')?['body']?['d']['Division/Label']}",
 "TermGuid": "@{outputs('HttpGet')?['body']?['d']['Division/TermGuid']}",
 "WssId": @{outputs('HttpGet')?['body']?['d']['Division/WssId']}
 }
 }
]

Although this didn't crash, it says "The data returned from the tagging UI was not formatted correctly" and this is the actual HTTP's output:

"ValidateUpdateListItem": {
 "__metadata": {
 "type": "Collection(SP.ListItemFormUpdateValue)"
 },
 "results": [
 {
 "ErrorCode": -2146232832,
 "ErrorMessage": "The data returned from the tagging UI was not formatted correctly",
 "FieldName": "Division",
 "FieldValue": "{\n\"Label\": \"4\",\n\"TermGuid\": \"b40496ff-d20d-4758-b8b5-6d4e1ce91c0e\",\n\"WssId\": 4\n}",
 "HasException": true,
 "ItemId": 1
 }
 ]
}

So, I believe the format in "Compose formValues" action is incorrect. Can someone tell me what the right format is?

Thank you in advance.

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

    Hi @Anonymous,

     

    You are just updating the field with one value, correct? As far as I am aware you can format the MMS FieldValue like this:

    termlabel|termguid

     

    Can you try this as a FieldValue:

    concat(outputs('Compose')?['body']?['d']['Division/Label'],'|',outputs('HttpGet')?['body']?['d']['Division/TermGuid'])

     

    Also have a look at this nice blog from @tom_riha, that might be useful as well:

    https://tomriha.com/how-to-update-sharepoint-managed-metadata-column-power-automate/

     

  • Community Power Platform Member Profile Picture
    on at

    Thank you very much.  After I changed "FieldValue" to what you said, it worked!

    [ 
     { 'FieldName': 'Division',
     'FieldValue': '@{concat(outputs('HttpGet')?['body']?['d']['Division/Label'],'|',outputs('HttpGet')?['body']?['d']['Division/TermGuid'])}'
     }
    ]
  • Matt Collinge Profile Picture
    43 on at

    Tom gives the best working answer to this. Thank you for sharing the link.

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