Activities
latest
false
Banner background image
Document Understanding Activities
Last updated Apr 10, 2024

Document Processing Using FlexiCapture Scope and Language Detection

The example below explains how to use the Intelligent OCR and FlexiCapture activities for processing documents, extracting specific information, and displaying it in a message box. It presents activities such as FlexiCapture Scope and Get Field. You can find these activities in the UiPath.Abbyy.Activities package.

This is how the automation process can be built:

  1. Open Studio and create a new Process named by default Main.

    Note: Add all the files used by the robot in the project folder. You can use your own files or you can download the ones provided in the below example.
  2. Drag a Sequence container in the Workflow Designer and create the following variable:

    Variable Name

    Variable Type

    Default Value

    InvoicesFolder

    String

     
  3. Drag a For Each activity inside the Sequence container.

    • Add the value InvoiceFilePath in the ForEach field.
    • In the Properties panel, select the option String from the TypeArgument drop-down list.
    • Add the expression Directory.GetFiles(InvoicesFolder) in the Values field. We have provided two Japanese invoices. The language detection is done automatically.
  4. Drag a FlexiCapture Scope activity inside the Body container of the For Each activity.

    • Select the Do container of the activity and create the following variables:

      Variable Name

      Variable Type

      Default Value

      ProcessedInvoice

      UiPath.Abbyy.Core.FlexiCapture.FCDocument

       

      ClientName

      UiPath.Abbyy.Core.FlexiCapture.FCField

       

      TotalAmount

      UiPath.Abbyy.Core.FlexiCapture.FCField

       
  5. Place a Write Line activity inside the Do container.

    • Add the expression "Processing " + InvoiceFilePath in the Text field.
  6. Drag a Process Document activity under the Write Line activity.

    • In the Properties panel, add the expression {"JPInvoiceSampleDefinition.fcdot"} in the DefinitionFiles field.
    • Add the value InvoiceFilePath in the Document field.
    • Add the variable ProcessedInvoice in the Result field.
  7. Add a Get Field activity below the Process Document activity. This activity extracts the Client Name from the processed document.

    • In the Properties panel, add the variable ProcessedInvoice in the Document field.
    • Add the value "ClientName" in the Name field.
    • Add the variable ClientName in the Result field.
  8. Drag another Get Field activity and place it below the first one. This activity extracts the Total Amount from the processed document.

    • In the Properties panel, add the variable ProcessedInvoice in the Document field.
    • Add the value "TotalAmount" in the Name field.
    • Add the variable TotalAmount in the Result field.
  9. Drag a Write Line activity below the Get Field activity.

    • Add the expression "Client Name: " + ClientName.Value + " | Total Amount: " + TotalAmount.Value in the Text field.
  10. Run the process. The robot extracts the data, processes the document, extracts the specified fields, and displays the results.

Download example from here.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.