Community

How to use Service Field

 Hi 

I am new to FC12.

I want to add a service field to put a file name referencing scripts described in following link:

http://www.capturedocs.com/thread/234-tip-getting-the-filename-only/

The script does not have error but I get the following error on the service field when I recognize documents.  

Unable to modify a read-only field 'Servie Field' at ABBYY.

FlexiCapture.IField.set_text(String_result)

Here's what I did:

Create a service field > Data Source tab > Source : Image source > Rules tab > New rule > Edit > add the script

This is a script I used:

 

using System ;

string documentName = Context.Document.Pages[0].ImageSourceFileSubPath;

Context.Field("Service Field").Text = "TEST";

 

What am I missing? 

There is few source about Service field so I need to know very first steps.

Please help.

 

Thank you,

 

K

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Ilya Evdokimov

     Hi.  First, for this purpose, a Text field should be used, not a Service field.  The provided Service fields are read-only as they are designed to return some specific metadata element.

    Second, if you are already using a Text field where this rule is acting, then check your Script Rule and make sure that on the first tab of the Rule, where you have a list of fields (with probably one field in the list), make sure that the 'Read-only" checkbox is unchecked.  See step#12 in this article: http://help.abbyy.com/en-us/flexicapture/12/distributed_administrator/rule_script

     

    1

Please sign in to leave a comment.