Community

How to remove recognized lineItems

Question: how to remove rows in line items except first row by rule(script) in FC4I?
0

Comments

6 comments

  • Avatar
    Timur
    Hello,

    Lineitems is a repeatable group element, in order to add new items you need to use AddNew( insertAt : int ) method of IField context:

    Context.Field("FieldName").Items.AddNew(i);

    Note that this method cannot be used in rule scripts. In order to add new items with AddNew method, you will need to create an additional processing stage in your workflow.

    Information about workflows can be found in the following section of help file:ABBYY FlexiCapture Help - Administrator->Program settings->Set up ABBYY FlexiCapture Complex->Workflow SetUp

    Information about using scripts in workflows can be found in:ABBYY FlexiCapture Help - Administrator->Appendix->using scripts in ABBYY FlexiCapture->Scripts for customizing processing stages.





    0
  • Avatar
    Artūras Vonsevičius
    My question is how to remove rows. I need live only one recognized row.
    0
  • Avatar
    Timur
    In order to delete rows you need to use the following construct: Context.Field("FieldName").Items.Delete(i);
    0
  • Avatar
    Artūras Vonsevičius
    Exception returned:
    System.NotImplementedException: The method or operation is not implemented. at ABBYY.FlexiCapture.IFields.Delete(Object _what) at Main.Execute(IRuleContext Context)
    0
  • Avatar
    Timur
    Hello,
    This method is not implemented in rule scripts.


    In order to add or remove items with, you will need to create an additional processing stage in your workflow and a a document processing script.

    Information about workflows can be found in the following section of help file:ABBYY FlexiCapture Help - Administrator->Program settings->Set up ABBYY FlexiCapture Complex->Workflow SetUp

    Information about using scripts in workflows can be found in:ABBYY FlexiCapture Help - Administrator->Appendix->using scripts in ABBYY FlexiCapture->Scripts for customizing processing stages.


    As an alternative to creating stages, you can also try using Custum action scripts.
    User script (Custom action), custom action script is a script that is executed only when user clicks a button that will appear after creating such a script in field's properties.

    Check help file for more info: FlexiCapture help administrator->Program settings > Document Definitions > Field properties > Text entry fields > Custom action

    0
  • Avatar
    Hajar Herrou

    Hello,

    Im facing the same issue, did you resolved your problem?

    Best Regards

    0

Please sign in to leave a comment.