FCI - How to set line Items to null depending on certain condition


The requirement is the if certain key words are present on Invoice then we are not suppose to extract line items. How to do this. Can it be possible to stop line Item extraction on condition  or to set it to null ?



1 comment

  • Avatar
    Scott Chau

    You're going to have to script this in the workflow of your FlexiCapture project.  for example the following script deletes the line item if there is no PurchaseOrder found.  You can either modify the script for your needs or talk to ABBYY professional service team.

    if (Document.Field("Invoice Layout\\PurchaseOrder").Items.Count == 0)
    for (int i = Document.Field("Invoice Layout\\LineItems").Items.Count - 1; i >= 0; i--)
    IField objDeleteField = Document.Field("Invoice Layout\\LineItems").Items[i];
    Document.Field("Invoice Layout\\LineItems").Items.Delete(objDeleteField);


Please sign in to leave a comment.