How to remove recognized lineItems

  • 1.7K Views
  • Last Post 23 September 2019
arturasv posted this 14 December 2015

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

Order By: Standard | Newest | Votes
Hajar Herrou posted this 23 September 2019

Hello,

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

Best Regards

Timur posted this 23 December 2015

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

arturasv posted this 22 December 2015

Exception returned:
System.NotImplementedException: The method or operation is not implemented. at ABBYY.FlexiCapture.IFields.Delete(Object _what) at Main.Execute(IRuleContext Context)

Timur posted this 21 December 2015

In order to delete rows you need to use the following construct: Context.Field("FieldName").Items.Delete(i);

arturasv posted this 19 December 2015

My question is how to remove rows. I need live only one recognized row.

Timur posted this 17 December 2015

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.





Close