- Introducing ABBYY FlexiCapture
- ABBYY FlexiCapture architecture
-
Using scripts in ABBYY FlexiCapture
- Specifics of scripts written in .Net languages
- External assemblies
- Script editor
- Object model
-
Scripts for customizing processing stages
-
Types of scripts
- Script rule
- Autocorrection script
- Export script
- User script (custom action)
- Document assembly script
- Custom recognition script
- Stage rule
- Processing scripts
- Data set update script
- Data set validation scripts
- Document classification script
-
Event handlers
- Batch created
- Batch deleted
- Batch parameter change
- Batch structure change (page added/page deleted/document added/document deleted)
- Pages moved
- Batch opened/closed
- Batch integrity check
- Document parameter changed
- Document state changed
- Export completed
- Script that is run after rule checks
- Before matching
- Field verification request
-
Objects
- IActionResult
- IAssemblingError
- IAssemblingErrors
- IBatch
- IBatchCheckResults
- IBatchItem
- IBatchItems
- IBatchTypeClassifier
- IBatchTypeClassifierResult
- IBinarizationParams
- IBoxedBoolean
- ICharacterParams
- ICharactersParams
- ICheckmarkGroupValue
- ICheckmarkValue
- IDataSet
- IDataSetQuery
- IDataSetRecord
- IDocument
- IDocuments
- IDocumentExportResults
- IDocumentsExportResults
- IDocumentDefinitionInfo
- IDocumentDefinitionInfoArray
- IEditablePictureObject
- IExportFieldsToRedact
- IExportImageSavingOptions
- IField
- IFieldRegion
- IFieldRegions
- IFields
- IFlexiCaptureTools
- ILocalContrastParams
- IMatchedSectionInfo
- IMatchingInfo
- IPage
- IPageClassificationResult
- IPages
- IPictureObject
- IPictureObjectsInfo
- IPrincipal
- IPrincipals
- IProcessingCallback
- IProject
- IProperties
- IProperty
- IPropertyModificationInfo
- IRecordCheckResult
- IRecordset
- IRect
- IRects
- IRoutingRuleResult
- IRuleContext
- IRuleError
- IRuleErrors
- IRuleTag
- IRuleTags
- IScriptBinaryAttributes
- IScriptDefinitionContext
- ISectionDefinitionInfo
- ISectionDefinitionInfoArray
- IShadowsHighlightsParams
- IStageInfo
- IUserAttachment
- IUserAttachments
- IUserSessionInfo
- IValue
- IVARIANTArray
- TAssemlingErrorType
- TBatchItemType
- TColorToFilter
- TExportFieldType
- TExportType
- TImageCompressionType
- TPageClassificationType
- TPdfAVersion
- TPdfDocumentInfoType
- TPdfTextSearchAreaType
- TPrincipalType
- TProcessingPriority
- TPropertyType
- TRuleErrorType
- TStateType
- Sample scripts
- Internal names of recognition languages
-
Types of scripts
-
Scripts for processing interface events
-
Event handlers
- On Document Closed
- On Project Closed
- On Activate Document
- On Field Control Activate
- On Return From Task
- On User Command
- On Field Control Deactivate
- On Closing Document
- On Task Close
- On Closing Project
- On Region Change
- On Task Window Mode Changed
- On Open Document
- On Task Window Create
- On Task Reject
- On Region Control Draw
- On Task Send To Stage
- On Text Field Validating
-
Objects
- IBoolean
- IBoxedFieldControl
- IDocumentEditor
- IDocumentItem
- IDocumentItems
- IDocumentsCollection
- IDocumentsWindow
- IDrawContext
- IErrorControl
- IErrorControls
- IErrorsWindow
- IFieldControl
- IFieldRegionControl
- IFieldRegionControls
- IFormWindow
- IImageWindow
- IMainMenu
- IMainWindow
- IMenu
- IMenuItem
- IPageControl
- IPageItem
- IPageItems
- IPagesCollection
- IPoint
- ISelection
- IShellRational
- IShellRect
- IShellRects
- ITaskWindow
- ITextEditor
- IToolbar
- IToolbarButton
- IToolbars
- TCommandBarType
- TCommandID
- TDockingType
- TDocumentState
- TErrorType
- TSelectionType
- TTaskWindowMode
- TTextSize
- TUserRole
- TWorkWindowType
-
Event handlers
- User script for Web Verification Station
-
Application Programming Interface (API)
- About the ABBYY FlexiCapture Application Server Web Services API
- Using the Web Services API of the ABBYY FlexiCapture Application Server
-
References
- API Methods
- Data types
- Working with files
- Web Services Mobile API
- Web Services for user account management
- Examples of API Use
- Integrating Web Stations into third-party systems
- Configuring additional settings and customizing Web Stations
- Custom reports
-
Appendix
- Supported recognition languages
- Fonts for correct characters rendering
- Supported text types
- Supported barcode types
- Supported input formats
- Export file formats
- Date formats
- Alphabet used in regular expressions
- Protecting Document Definitions and additional modules
- Glossary
- Patents
- Third-party technologies
- Technical support
- End-User License Agreement (EULA)
English (English) - Change language
Sample database search script
This sample script will search for data in a database at the Web Verification Station.
Before you proceed to configure this user script, be sure to complete the following steps:
- Open the Project Setup Station and click Project → Document Definitions...
- Click Document Definition → Document Definition Properties, open the data sets tab, and then click Add....
- Create a data set, create a few records, and click Close.
A new user script will be added to the Script Editor for Web Verification Station.
Sample script that searches for data in a database
//DataSet Name var dbCacheName = 'DataSet1'; //Field in dataset, used to replace current field value var fieldNameInCache = 'Field2'; var self = this; var styles = { display: 'block', position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px', width: '100%', height: '100%', border: '0', overflow: 'hidden', 'overflow-x': 'hidden', 'overflow-y': 'hidden', 'z-index': '10000' } var newValueToInsert = ''; // Sets iframe styles setStyles( styles, function() { //Dialog markup var windowMarkup = "<div class='frame'><div class='searchField'><input id='searchValue' /><button id='searchButton'>Search</button></div><div id='recordspanel'><table id='resultspreview'></table><div id='norecord'>No records found</div></div><div class='buttonsfield'><button id='confirm'>Ok</button><button id='cancel'>Cancel</button></div></div>"; //Dialog styles var css = "<style>body{width:100vw;height:100vh;background:rgba(0,0,0,0.1);margin:0;padding:0;display:flex;align-items:center;justify-content:center;}.frame{width:400px;max-height:80vh;background:white;min-height:200px;padding:50px;}#norecord{display:none;}#searchValue{width:calc(100% - 60px);}#cancel{margin-left:20px;}.buttonsfield{display:flex;justify-content:flex-end;height:25px;}.bolded{font-weight:bold;}button{width:60px;}#confirm{display:none;}#recordspanel{min-height:145px;padding: 10px 0;}#searchfield{height:30px;}</style>"; //Set styles $('head').append(css); //Creates dom in iframe $("body").append(windowMarkup); // Search button click $('#searchButton').click(function () { //Look in Dictionary getDict( { cacheName: dbCacheName, //dataset name filters: [{ FieldName: "", FieldValue: $('#searchValue').val() }] //fields to search }, function (result) { //Records rows from dataset var records = result.detail.result; //First row description var firstRecord = records[0]; //hide 'table' and 'ok' button if no result is found if (!firstRecord) { $('#resultspreview').hide(); $('#norecord').show(); $('#confirm').hide(); } else { $('#resultspreview').show(); $('#confirm').show(); $('#norecord').hide(); $('#resultspreview').html(''); firstRecord.forEach(function (recordData) { if (fieldNameInCache === recordData.FieldName) { newValueToInsert = recordData.FieldValue; } $('#resultspreview') .append('<tr class="' + (fieldNameInCache === recordData.FieldName ? 'bolded' : '') + '"><td>' + recordData.FieldName + '</td><td>' + recordData.FieldValue + '</td></tr>'); }); } }); }); //On 'ok' button click $('#confirm').click(function () { if (newValueToInsert) { //Set value to current field setCurrentFieldValue(newValueToInsert); //Save and close iframe save(); } }); //On 'cancel' button click $('#cancel').click(function () { cancel(); }); });
This sample script can also be found here: http://<ApplicationServer>/FlexiCapture12/Verification/Scripts/CustomScripts/customActionLookup.js, where <ApplicationServer> is the name of the computer where the Application Server is installed.
Replace the values in the following lines of the sample script:
- var dbCacheName = 'DataSet1', where DataSet1 is the name of the data set created earlier.
- var fieldNameInCache = 'Field2', where Field2 is the name of the data set field that will contain the value to be copied.
14.01.2021 14:17:18