Description
If you want to set a value to Today's date, which is something available within SharePoint as an option, but not all other repositories, you can reference the example script below.
NOTE: Modify your Metadata is only available in Capture Server Pro 1.10 and later.
Example
batch.Documents.forEach(function (doc) {
todaysDateValue = new Date();
builder.SetDocumentMetadata(doc.DocumentId, "Index", "DateProcessed", todaysDateValue);
});
In this example, we are simply setting a field called DateProcessed to today's date.
1. |
batch.Documents.forEach(function (doc) { |
|
First, we cycle through each document using a ForEach and create a new Date variable called todaysDateValue. By default, if no date is set, it will enter today's date. |
2. |
builder.SetDocumentMetadata(doc.DocumentId, "Index", "DateProcessed", todaysDateValue); |
|
We will then set the document metadata of DateProcessed in the Index category to the above referenced variable of todaysDateValue |
Comments
0 comments
Please sign in to leave a comment.