Upland OL User community

Write/Add metadata from JavaScript

Is there a way to write directly into a metadata from a JavaScript

Old flow:
I set 7 workflow variables (1-7) with a JavaScript:

for (var i = 0; i < FileMetaJSON[“Pages”].length; i++) {
Watch.SetVariable(‘PaperTypePage’ + (i + 1), FileMetaJSON[“Pages”][i].PaperType);
}
Then the data is placed in metadata with Metadata Fields Managment and a lot of rules.


Can’t I just skip the Metadat Fileds Management part and write it directly into metadata with a javascript. This flow is limited to 7 pages, the customer want to ulimited pages.

Hi @klaus.soerensen,

Is there a way to write directly into a metadata from a JavaScript

This is possible by making use of the MetaFile Object.

Thanks, just the example I was looking for.
The documentation gives nothing, cause there are no examples in there.

2 Likes