We are trying to develop a workflow to loop through a set of documents in a folder, and write the metadata of the containing folder to the documents. We have it setup so documents take on the metadata of the folder they are first added to, but need to cover the scenario where the document gets moved to a different folder.
So far we have used the following call:
_api/Web/GetfolderByServerRelativeUrl('/folderurl/')/ListItemAllFields/DocType
with DocType being the metadata column of the folder.
The response appears to be returned like this:
d:{
__metadata: {
id: _api/Web/GetfolderByServerRelativeUrl('/folderurl/')/ListItemAllFields/DocType,
url: _api/Web/GetfolderByServerRelativeUrl('/folderurl/')/ListItemAllFields/DocType,
type: "SP.Taxonomy.TaxonomyFieldValueCollection"
},
Items: {
__metadata: {
type: ""SP.Taxonomy.TaxonomyFieldValueCollection"
},
results: [
{
Label: "Design Guidance",
TermGuid: "da5280dc-e52b-42aa-80a1-65ffb18b9f50",
WssId: 48
}
]
}
}
The string under Label is what we're trying to retrieve so we used a Get an Item from Dictionary action with d/items/results/label as the expression and output to a string variable. Unfortunately this doesn't seem to be working as logging the variable results in a blank value.
Any help would be much appreciated.
