HasRuleError Message

  • 154 Views
  • Last Post 27 April 2018
samsay posted this 27 March 2018

Hi, i want to show a value in a field "ABC" as "true", if another field "PQR" has rule error and when that rule error is cleared, then value in "ABC" should become "false". Can anyone tell me

Order By: Standard | Newest | Votes
Vladimir Dimitrijevic posted this 11 April 2018

Hi Samir,

In case that PQR field has script rule, then you can change value of ABC field directly from that script. Otherwise, I am not sure that this is possible using script rule in document definition.

Best regards,
Vladimir

samsay posted this 11 April 2018

Hi vladimir, i tried to change value of "ABC" directly from "PQR" field which has a rule error. It works correct when documents are recognised first time and rule error is there. But when rule error is cleared for "PQR" field, field "ABC" is not changing its value. The value is still as it was before. Please try yourself also and let me know.

Ekaterina posted this 17 April 2018

Hello,

You may try to use Using scripts in ABBYY FlexiCapture > Scripts for processing interface events > Event handlers > On Field Control Activate and On Field Control Deactivate events.

samsay posted this 17 April 2018

Hi Ekaterina, can you give any sample script to access fields in Ifield enviroment. Is it like, "Document.field ("Invoice Layout\\InvoiceNumber") or how?

 

Ekaterina posted this 27 April 2018

Hello,

The starting object in the “On Field Control Activate/Deactivate” scrpits is IFieldControl Context. So to get access to the same document's field you will need to use Context.Field.Text (or Value) property,  and to get access to other document's fields' values you will need to use Context.FormWindow,DocumentWindow.Document,Field(<Full name>).Text (or Value) - in this case they are read-only.

Close