Hi all,
I'm triying to create a flow that update the value of a managed metadata column in a file, copiying the values form another, and its not working in anyway, anyone knows how do to work it??
Basic details:
- Managed Metadata Column created at Collection level.
- Use a taxonomy term group created at Collection level.
- Terms do not have any child terms (all of them at firs level).
- Column allow multiple selection.
- Column Name "Region-Country"
Previous principal trys:
1. Save values in a variable using "Append to array variable" > Update values using "Send an http request to sharepoint"
- "Append to array variable" (variable name "Region-Country Array"):
{
"Label": "Term Label",
"TermGuid": "Term Guid",
"WssId": -1
}
- "Send an http request to sharepoint":
- Methoth: POST
- Uri: _api/web/lists/getbytitle('Released Documents')/items(itemid)
- Headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"If-Match": "*",
"X-HTTP-Method": "MERGE"
}
- Body:
{
"Region_x002d_Country": {
"__metadata": { "type": "Collection(SP.Taxonomy.TaxonomyFieldValue)" },
"results": "Region-Country Array"
}
}
2. Update values using "Send an http request to sharepoint"
- "Send an http request to sharepoint":
- Methoth: POST
- Uri: _api/web/lists/getbytitle('Released Documents')/items(itemid)
- Headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"If-Match": "*",
"X-HTTP-Method": "MERGE"
}
- Body:
{
"Region_x002d_Country"": {
"__metadata": { "type": "SP.Taxonomy.TaxonomyFieldValue" },
"Label": "Spain (ES)",
"TermGuid": "97e2ec89-f748-4e85-9ca7-0c3606e8c4ca",
"WssId": -1
}
}
3. Update values using "Send an http request to sharepoint" using column id name
- "Send an http request to sharepoint":
- Methoth: POST
- Uri: _api/web/lists/getbytitle('Released Documents')/items(itemid)
- Headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose",
"If-Match": "*",
"X-HTTP-Method": "MERGE"
}
- Body:
{
"j5f9baed4cd144e4aad37baf4508fd95"": {
"__metadata": { "type": "SP.Taxonomy.TaxonomyFieldValue" },
"Label": "Spain (ES)",
"TermGuid": "97e2ec89-f748-4e85-9ca7-0c3606e8c4ca",
"WssId": -1
}
}