Question
Is it possible to take the field value and use it as a registry parameter?
Answer
There is a possibility to use a scripted stage in the workflow to extract the field value as a registry parameter. As a sample, the Invoice Number field will be used. The sample script is the following:
if (Documents.Count > 0) { if (Documents[0].HasField(@"Invoice Layout\InvoiceNumber")) //takes the first document in the batch { Batch.Properties.Set("Invoice Number", Documents[0].Field(@"Invoice Layout\InvoiceNumber").Text); } }
Create a Custom script stage in the Advanced workflow:
The results will be the following:
Before recognition:
After recognition:
Please note that the provided script is for demonstration purposes only and it needs to be optimized according to your needs. It's applicable if there is only one document in the batch. If there are more documents, the field value of the first document will be used.
Comments
0 comments
Please sign in to leave a comment.