Community

Replacing a found character (hardcoded)

Hi,

I am searching for a paymentId on some invoices. It has a tendency to find the last digit as a character K.

I would like to replace the K with the number 1. What is the best way to do this?

I think I should add a region field and then add code in the pre-search field, which asks for the found value from

the previous character string field and then I could do something like replace(charracterstring.fieldvalue, "K","1").

Could anyone correct me ? :-)

 

Was this article helpful?

0 out of 0 found this helpful

Comments

3 comments

  • Avatar
    Ekaterina

    Hello,

    The most recommended way of correcting the OCR results in FlexiCapture is to set up correctly the data type for the recognized value:

    Document Definition Editor > field properties > Data tab > data type > Edit...

    By selecting the proper data type you will promote the correct recognition variants.

    For more information about this please see the following Help article:

    FC11 Help Administrator: Program settings > Document Definitions > Field properties > Text entry fields > Data types of the text entry field 

    You may also inflate the field region a little, sometimes it also gives a better recognition result.

    Otherwise you may use the autocorrection script as you wanted to, but it would be better if you first try the methods described above.

    0
  • Avatar
    MyAvatar

    Hi Ekaterina,

    I have found the options you mention in regards to the Autocorrect  Script.
    This would then apply for all our suppliers.

    We only need it for a specific few, as we prefer not to touch the "default" project properties too much.
    Wouldn't this be possible by having snippet of code doing a search and replace in the "Advanced Post Search Relations"
    window in the specific search element field of the training batch for this specific vendor ?

     

     

    0
  • Avatar
    Ekaterina

    Hello,

    The FLS is used for capture regions, it will be wrong to use it for modifying values.

    0

Please sign in to leave a comment.