UiPath Activities

The UiPath Activities Guide

Data Extraction using FlexiCapture

The example below explains how to extract and validate data from ID documents issued by different countries. It presents activities such as IntelligentOCR Scope, Process Document, Prepare Validation Station Data, and Present Validation Station. You can find these activities in the UiPath.IntelligentOCR.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 it the below example.

  1. Drag a Sequence container in the Workflow Designer and create the following variables:
Variable Name
Variable Type
Default Value

fcDoc

UiPath.IntelligentOCR.FC.FCDocument

-

result

String

-

  1. Drag an Assign activity inside the Sequence container.
    • Add the variable result in the To field.
    • Add the expression "FirstName|LastName|DateofBirth"+Environment.NewLine in the Value field. This expression creates three new empty fields: First Name, Last Name and Date of Birth.
  2. Drag a For Each activity below the Assign activity.
    • Add the value item in the ForEach field.
    • In the Properties panel, select the String option from the TypeArgument drop-down list.
    • Add the expression directory.GetFiles("files") in the Values field.
  3. Drag an IntelligentOCR Scope activity inside the Body container of the For Each activity.
  4. Place a Sequence activity inside the IntelligentOCR Scope activity. This activity extracts the desired data from the given ID documents.
    • Create the following variables:
Variable Name
Variable Type
Default Value

firstName

UiPath.IntelligentOCR.FC.FCField

-

lastName

UiPath.IntelligentOCR.FC.FCField

-

dateOfBirth

UiPath.IntelligentOCR.FC.FCField

-

vdData

UiPath.IntelligentOCR.FC.ValidationStationAdapters.ValidationStationData

-

validatedResults

UiPath.DocumentProcessing.Contracts.Results.ExtractionResult

-

  1. Drag a Process Document activity inside the Sequence container of the IntelligentOCR Scope.
    • In the Properties panel, add the expression {"IDs.fcdot"} in the DefinitionFiles field.
    • Add the value item in the Document field.
    • Add the variable fcDoc in the Result field.
  2. Drag a Prepare Validation Station activity below the Process Document activity.
    • In the Properties panel, add the variable fcDoc in the Document field.
    • Add the variable vdData in the ValidationStationData field.
  3. Drag a Present Validation Station activity below the Prepare Validation Station activity.
  4. In the Properties panel, add the expression vdData.ExtractionResults in the AutomaticExtractionResults field.
    • Add the expression vdData.Dom in the DocumentObjectModel field.
    • Add the expression item.ToString in the DocumentPath field.
    • Add the expression vdData.RawText in the DocumentText field.
    • Add the expression vdData.Taxonomy in the Taxonomy field.
    • Add the variable validatedResults in the ValidatedExtractionResults field.
  5. Place an Assign activity below the Present Validation Station activity.
    • Add the variable result in the To field.
    • Add the expression result+validatedResults.ResultsDocument.Fields(0).Values(0).Value+"|"+validatedResults.ResultsDocument.Fields(1).Values(0).Value+"|"+validatedResults.ResultsDocument.Fields(2).Values(0).Value+Environment.NewLine in the Value field. This activity assigns values for each of the fields (First Name, Last Name and Date of Birth) defined at the beginning of the example.
  6. Place a Write Text File activity under the For Each activity.
    • Add the expression result.txt in the FileName field.
    • Add the variable result in the Text field.
  7. Run the process. The robot extracts the data from the given ID documents, the user validates them and the validated results are saved in a .txt file.
     
     
    Download example

Updated about a month ago


Data Extraction using FlexiCapture


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.