- You can specify element locations relative to the field regions detected when the main FlexiLayout of the invoice project was applied.
- You can use identifiers of vendors and business units in requests to the data set of the Document Definition.
- You can export lists of keywords and other FlexiLayout parameters to an XML file. You can then edit them without editing the FlexiLayout or the Document Definition.
Create an additional FlexiLayout
1
Open a batch in FlexiCapture
Open a batch with recognized invoices in FlexiCapture.
2
Create a FlexiLayout Studio project
Create a new project in ABBYY FlexiLayout Studio. On the main menu, select Tools → Export Batch to FlexiLayout Studio → Create New FlexiLayout Studio Project….This command is available only for FlexiCapture projects stored on your computer. In a distributed installation, if the project is stored on the server, download it to your computer first. To do this, click Export Project… on the Project menu.
Add a field to an additional FlexiLayout
To add a field to an additional FlexiLayout, create a block for the field and specify its search element. Fields in the Document Definition must have unique names, so name the block according to what you want to do:Add pages to an additional FlexiLayout
To test changes to an additional FlexiLayout on new images, export FlexiCapture batches into an existing invoice project in ABBYY FlexiLayout Studio. Click Tools → Export Batch to FlexiLayout Studio → Add to Existing FlexiLayout Studio Project…. You can export FlexiCapture batches only into ABBYY FlexiLayout Studio projects created with the Create New FlexiLayout Studio Project… command. Each exported FlexiCapture batch becomes a new batch in the ABBYY FlexiLayout Studio project.Export fields added after the project was created
The new Document Definition can have more fields than the one used for the ABBYY FlexiLayout Studio project. In that case, the export log contains a warning for each extra field. To export the extra fields, add a block with the same name for each one in the CommonBlockRegions node of the SearchElements tree.Make requests to data sets from the Document Definition
You can find a sample request in the DataSetRequestSample element. This element is disabled by default.NamedValue type
A named value. Constructor:NamedValue( String, String )
NamedValueArray type
An array of named values. Constructors:NamedValueArray()NamedValueArray( NamedValue namedValue )
Function parameters
When a request in searchCriteria contains several values, combine them with the OR and AND operators:
Functions
Search for rows from a column in an external database on an image
1
List the columns
Use FieldNamesOfFCDataset to get a list of columns sorted in ascending order of their index numbers.
2
Find the column index
Determine the index number of the column from which you need to find data.
3
Build the filter
Create an array of conditions for filtering data from the data set.
4
Run the search
Pass the index numbers of the column and the filter conditions to SearchTextFromFCDataSet (or RegularExpressionFromFCDataSet, if you need to use regular expressions).
Search an image for entries from multiple columns
Each call to the SearchTextFromFCDataSet function replaces the search parameters, so calling it repeatedly has no effect. As a workaround, get strings from an external database and pass them to the SearchText function. SearchText adds each string to the existing search parameters instead of replacing them.1
List the columns
Create an array of names of columns from which you need to find data.
2
Build the filter
Create an array of filter conditions for filtering data from the data set.
3
Count the entries
Determine the number of entries that are returned using the RecordCountOfFCDataset function.
4
Prepare the query
Prepare query data using the PrepareRecordsetOfFCDataset function.
5
Read each record
Go through all records and get the array for each record using the RecordOfFCDataset method.
6
Pass the values to SearchText
Pass the value of each element in the array to the SearchText function.
Complex columns
A complex column in a data set is stored as several columns in the encoded external database. In the following examples, the complex column Name is stored as three columns, so the data set fields are{VendorId, VATID, Name, Name, Name, City}.
To get the list of columns that a request returns, pass the searchFields array to the FieldNamesOfFCDataset function.
