How to add new line item based on Vendor name


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.


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.



Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request



Please sign in to leave a comment.