Skip to main content

Notifications

Power Automate - Building Flows
Answered

Sharepoint Taxonomy multivalue fields

Posted on by 48
Dear all
I created a Power Automate Flow to set Metadata of a Folder in a Sharepoint Library. I'm a normal user, so I don't have direct access to the Term Store.
 
I'm trying with a Send HTTP Request to Sharepoint action to update a Taxonomy Multivalue field.
 
I saw on this website UPDATE! Using REST to set a multi-value Managed Metadata  Field in SharePoint a possible soluton, but I didn't resolved to convert it in Power Automate.
 
Can anyone help?
I tried with this Body (the URI is ok)
 
{
"__metadata": {
"type": "SP.Data.SharepointLibraryName_ArbeitItem"
},
"BusinessPartner": {
"results": [
"-1;#Term1|{TermGuid}"
]
}
}
 
or also so
{
"__metadata": {
"type": "SP.Data.SharepointLibraryName_ArbeitItem"
},
"BusinessPartner": "-1;#Term1|{TermGuid}"
}
 
I receive always the error that the JSON is not correct and a Primitive Character is present
  • Verified answer
    renatopc84 Profile Picture
    renatopc84 48 on at
    Sharepoint Taxonomy multivalue fields
    Hi Expiscornovus
     
    Thank you very much :)
    Your help has been fundamental to solve it.
     
    The example you provided allows me to save only 1 Taxonomy value, but I modified it and in the Body, instead of a single Term, I passed all of them separated by semicolon. I pass directly a string from the Power Apps Form with all the term already formatted in this way.
     
    Thank you again very much!!!
     
    {
        "formValues":[
    {
        "FieldName": "Business_x0020_Partner",
        "FieldValue": "Term1|{Term1Guid};Term2|{Term2Guid};Term3|{Term3Guid}"
    }
        ]
    }
  • Verified answer
    Expiscornovus Profile Picture
    Expiscornovus 30,664 on at
    Sharepoint Taxonomy multivalue fields
    Are you using the validateUpdateListItem method? 
     
    If not, maybe the below example helps?
     
    URI
    _api/web/lists/getbytitle('Folder Metadata')/items(1)/validateUpdateListItem
     
    Body
    {
        "formValues":[
    	{
    	    "FieldName": "Business_x0020_Partner",
    	    "FieldValue": "Microsoft|842d6d80-195b-49de-ac59-f2276973dc89"
    	}
        ]
    }
     
    1. The Term Guid of my example Microsoft Term/Label
     

    2. Column setup which uses this Term Group
     
    3. The flow setup which refers to Folder A by using its id (1)
     
     
    4. The test result
     



    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel


  • renatopc84 Profile Picture
    renatopc84 48 on at
    Sharepoint Taxonomy multivalue fields
    Hi Expiscornovus
     
    I tried but I receive always the same error (that I translated here)  Status 400 "An unexpected PrimitiveValue node was found while reading from the JSON reader. A StartObject node was expected."
     
     
  • Expiscornovus Profile Picture
    Expiscornovus 30,664 on at
    Sharepoint Taxonomy multivalue fields
    This might be caused by the -1? Each term is normally separated by ';#'. So, it looks like you are trying the update the value with two terms, '-1' & 'Term1', is that correct?
     
    If that is not correct, please update your value to:
    "BusinessPartner": "Term1|{TermGuid}"
    If you want to update it with two terms it would be:
    "BusinessPartner": "Term1|{TermGuid};#Term2|{TermGuid}"
    For a good example I can also recommend this blog from Tom Riha:
  • renatopc84 Profile Picture
    renatopc84 48 on at
    Sharepoint Taxonomy multivalue fields
    For information I replaced the real values SharepointLibraryName, Term1 and {TermGuid} that in my code are with real values without special characters

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard