Knowledge Base

Article ID: 1258 | Category: Template Developing | Type: FAQ | Last Modified: 8/27/2015

Using a Custom Action feature in FlexiCapture projects

Available downloads


When do you need a Custom Action feature? How to set it up?


As you know, in FlexiCapture we have the possibility to write rules which perform required actions on a field.
There is one nuance in using rules – rules are always kept up to date.
This means that after any change in a field or fields linked to a rule, or during recognition or repeat recognition, this rule will be executed as normal, i.e. the rule will always stay current.
But this also means that we can’t control the moment when a rule is executed and the number of executions.

There are scenarios which require that a rule be executed only at a specific moment, only when an explicit command to execute the rule has been given.
For these types of scenarios, we have created a Custom Action feature.
Actually, it is also a rule, but it is executed when you click on the button next to the field:


When do you need this feature? Usage scenarios are very different.
For example, showing your own dialogs in which the operator can check a field value, or compare it with values from another system/product, or choose a required value from the list which is loaded from an external source, or perform any other actions needed. You can also call an external recognition/classification module when transferring, say, a piece of an image. In addition, Custom Action can be used to reduce the load of the DB server and waiting time in the case of long and complex DB queries.
Below we will take a look at other examples of how Custom Action can be used.

You can setup CA similarly to a script rule.
Simply select the Custom Action tab for your field:

It’s worth noting that such script cannot be applied in the Web Data Verification station.

In the CustomAction.rar archive you will find 2 projects:

In sample projects external assemblies were used. For more information about adding assemblies to the project see this article.

529 people think this is helpful.
Was this information helpful to you?