Reputation: 57
Has anyone ever successfully set the default value of a managed metadata (single select) column in a SharePoint library/list via Power Automate/REST API?
I tried the following in Power Automate:
_api/web/lists/getbytitle('Test_ContentTypeAutomation')/fields/getbytitle('Department-name')
body: { '__metadata': { 'type':'SP.Taxonomy.TaxonomyField' }, 'DefaultValue': 'HR|d106fc07-5f11-43ca-995f-6aae1ea' }
But I got a "parameter __metadata does not exist in method GetByTitle"
Thanks, Sylvie
Upvotes: 0
Views: 684
Reputation: 41
try this instead: "type": "Collection(SP.Taxonomy.TaxonomyFieldValue)"
But I am not sure if it will work, working with Taxonomy is quite tricky with the REST v1 API. If it doesn't work try to take a look at the TaxonomyHiddenList
_api/Web/lists/getByTitle('TaxonomyHiddenList')/items(7)
I've modified some values doing this on the body
{
"__metadata": {
"type": "SP.Data.TaxonomyHiddenListListItem"
},
"Title": "Title2"
}
Hope It helps
Marti,
Upvotes: 0