Description
In many instances, we've seen users need to separate a single piece of metadata into multiple fields. This can be first and last name, an invoice number from a prefix or suffix, or various other cases.
Below is an example of how we might separate out a value gathered by a barcode, called PageBarcode in this example by using a hyphen as a delimiter of the two values.
NOTE: Modify your Metadata is only available in Capture Server Pro 1.10 and later.
Example
Set BatchID
batch.Documents.forEach(function (doc){
builder.SetDocumentMetadata(doc.DocumentId,"Index","BatchId",batch.BatchID);
});
Set BatchName
batch.Documents.forEach(function (doc){
builder.SetDocumentMetadata(doc.DocumentId,"Index","BatchName",batch.BatchName);
});
For auditing, sometimes people want the batch name or batch id to stick with a document through splits or multiple processes. The below examples outline how to do this.
1. |
batch.Documents.forEach(function (doc){ |
|
First we will cycle through each document using a ForEach |
2. |
builder.SetDocumentMetadata(doc.DocumentId,"Index","BatchId",batch.BatchID);or builder.SetDocumentMetadata(doc.DocumentId,"Index","BatchName",batch.BatchName); |
|
Then we will use the builder to set the document metadata for each batch to either the batch property of BatchID or the batch property of BatchName using batch.{BatchProperty} |
Comments
0 comments
Please sign in to leave a comment.