Skip to main content
An environment variable is a string that stores text, such as a path to an external resource. You specify environment variables in the project properties (Project → Project Properties → Environment Variables) and use them in Document Definitions and scripts. When you run a project on another Application Server or computer, the paths to external resources may change. If the project includes several Document Definitions, multiple database check rules, and several scripts, editing all of these objects can take a long time. To avoid editing every object the project uses, store the paths to external objects in environment variables and reference those variables when you create rules, set up export, or write scripts. To run the project in a different environment, you then edit only the connection parameters in the Environment Variables dialog box.

Types of environment variable

ABBYY FlexiCapture has two types of environment variable:
  • String – A text variable.
  • ADO connection string – A string used to connect to an ODBC-compatible database.

Create and edit environment variables

1

Open the Environment Variables tab

In the Project Properties dialog box, click the Environment Variables tab, and then click the New button.
2

Set the type and name

In the New Environment Variable dialog box, select a type and enter a name. You cannot change the type later.
3

Enter the value

Complete the Value field for the type:
  • For a String variable, enter a value (for example, the path to a folder or an e-mail address).
  • For an ADO connection string variable, specify the path to the database, the access parameters, and any other connection parameters the driver requires.
4

Add a description

Enter any necessary information in the Description field.
To edit or delete an existing environment variable, click Edit or Delete.

Use environment variables

You can use String environment variables to:
  • Specify a source of input images.
  • Specify settings that determine how documents are exported to files and images.
To call an environment variable, use the syntax <Env:Name_of_environment_variable> or <$:Name_of_environment_variable>. You can use ADO connection string environment variables to connect to databases:
  • When creating a database check rule
  • In a Document Definition when setting up export
  • In a Document Definition when connecting a data set to an external database
  • In field properties, when specifying value constraints
You can use environment variables of any type in scripts. Use the EnviromentVariables property of IProperties, available in the IProject interface.