Question
Is there a way where we can check for certain vendors and add new line item under Line Items section while creation of batch via script.
Answer
You can add the Script stage after the Recognition:
And use the following script based on Vendor Name (you can modify it based on your needs):
if (Document.Field("Invoice Layout\\Vendor\\Name").Text == "VENDOR_NAME")
{
int i = Document.Field("Invoice Layout\\LineItems").Items.Count;//sets a number of table line to be created
Document.Field("Invoice Layout\\LineItems").Items.AddNew(i);//add a row to end of the table.
};
Comments
1 comment
Ranjit Nayak
Is there way we can avoid blank lineitems for vendors like this approach?
Ex: We have used custom fields and linked under LineItems. Those are only applicable for few vendors.
But somehow its creating blank rows for other vendor though fields are not trained for vendor.
Please sign in to leave a comment.