> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Processing entered values

> Apply AutoCorrect rules to field values in ABBYY FlexiCapture: replace characters or text, change capitalization, remove spaces, or run a custom script.

For any data type, you can perform automatic processing of the entered value: remove white spaces, convert letters to uppercase or lowercase, automatically replace specific characters or text. To enable automatic processing of field values, on the Data tab of the field properties dialog box, click the Edit... button to the right of the AutoCorrect options field.

Select the automatic processing options.

If Apply AutoCorrect only once after recognition is selected, automatic processing is performed only once after the field value is recognized. Otherwise, automatic processing is performed each time the value in the field changes.

* To perform automatic replacement of characters in the recognized field value, click the Edit... button to the right of the Replace characters field. In the dialog box that opens you can add characters for automatic replacement. Added values are sorted in alphabetical order. If the specified characters occur in the recognized field value, they will be replaced automatically. You can specify the following replacement parameters:
  1. In the **Replace** field, enter one or more characters to be replaced.
  2. In the **With** field enter a character or a string for replacement.\
     **Note:** The string can apply if replacement is done in the whole text. For other options (Prefix, Suffix, Prefix and Suffix), only the first character applies.

<Accordion title="Show me the example">
  As replacement is done in Prefix, "A" is replaced with the first character of the replacement string.

  <img src="https://mintcdn.com/abbyy/mpS3pcxC_lkohQUS/images/flexi-capture/Rep_pref.gif?s=bd08b10286187b24213459abcd1dc23f" alt="" width="496" height="132" data-path="images/flexi-capture/Rep_pref.gif" />

  <img src="https://mintcdn.com/abbyy/mpS3pcxC_lkohQUS/images/flexi-capture/Rep_pref_result.gif?s=b53fa17884fcf525755b3cc21c253556" alt="" width="690" height="59" data-path="images/flexi-capture/Rep_pref_result.gif" />

  As replacement is done in Whole text, each character of the "ENT" string is replaced with "WXY".

  <img src="https://mintcdn.com/abbyy/mpS3pcxC_lkohQUS/images/flexi-capture/Rep_whole.gif?s=82d0d95363c8fd94c4c4b7b946854692" alt="" width="498" height="131" data-path="images/flexi-capture/Rep_whole.gif" />

  <img src="https://mintcdn.com/abbyy/mpS3pcxC_lkohQUS/images/flexi-capture/Rep_whole_result.gif?s=712d5dac7dfc75b4f8c51a4ec9e74de1" alt="" width="696" height="43" data-path="images/flexi-capture/Rep_whole_result.gif" />
</Accordion>

1. In the **Where** field choose whether to replace specified characters in prefix, suffix, both prefix and suffix or in the whole text.\
   If **Prefix** is selected, all consecutive characters specified in the **Replace** list will be replaced starting from the beginning of the text. For Suffix, character replacement is done starting from the end of text.\
   For example, if you choose to replace " B" with "%" and "AC" with "#" in prefix, the string "ABC ENTERTAC CORP" will be converted to "#%#%ENTERTAC CORP".

<Accordion title="Details">
  <img src="https://mintcdn.com/abbyy/mpS3pcxC_lkohQUS/images/flexi-capture/Replacement.gif?s=1543bbc8a121dfd9bef0c9c879776761" alt="" width="495" height="147" data-path="images/flexi-capture/Replacement.gif" />

  <img src="https://mintcdn.com/abbyy/8aWHPAJyzWmTqglX/images/flexi-capture/prefix.gif?s=3b211b85e8935efa7beed7263ad987f9" alt="" width="693" height="74" data-path="images/flexi-capture/prefix.gif" />
</Accordion>

* To perform automatic replacement of the entire recognized field value or separate words in the field value, click the Edit... button to the right of the Replace text field.\
  In the dialog box that opens you can add words and expressions for automatic replacement. To replace only whole fields, select Match entire field contents.\
  If you enable the option Exact search, the program will search and replace the exact word or expression you have entered, or if you enable Fuzzy search, the program will search and replace a word or expression that is similar to the one you have entered. The number of allowable errors depends on the length of the word.\
  Enable the option Match case for case-sensitive replacement words or expressions.

* Choose one of the method of text letters conversion in the Change capitalization dropdown list:
  1. None without conversion.
  2. UPPER all letters will be changed to uppercase.
  3. lower all letters will be changed to lowercase.
  4. First upper the first letter will be uppercase and the remaining ones - lowercase.

* Remove excess spaces enable this option if you want to remove whitespaces.

You can also use an [autocorrection script](/flexi-capture/appendix/scripts/script-conversion) for auto-replace: select the Use script option, click Edit... to open the script editor, and type in the code of the script.
