SQLI VARA Objects

SQLI or SQL Internal variable objects retrieve values from the Automation Engine database using SQL statements. You do not have to specify a Connection or a Login object because the database access remains internal. There is no limit to the length of the values. If you set one, this value applies to the first value column only. Items exceeding this limit are excluded.

To determine the maximum number of returned lines, use the SQLVAR_MAX_ROWS setting in the UC_SYSTEM_SETTINGS variable. For more information, see SQLVAR_MAX_ROWS.

Prerequisites

To be able to define SQLI VARA objects, the following must be true:

Important Considerations

Defining SQLI VARA Objects

An SQLI VARA object definition is made up of the following pages:

Defining the Variables Page

  1. In the Variable Settings section, specify the following:

    • Type

      Read-only, always SQL

    • Oracle Statement / SQL Server Statement / DB2 Statement / PostgreSQL Statements

      SQL statements used to select specific database entries that serve as variable values. You have two options:

      • Type your statement in the input field
      • Click the icon to open the cell editor and enter your SQL statement

      Example:select * from OH

      Maximum length: 4096 characters

      Notes:

      • SQL statements are not checked. You can change or delete database entries
      • The Automation Engine does not verify whether these SQL commands include errors or are dangerous. They are passed on to the database without being verified. This means that an execution error will only occur during database access, which is when the variables are being resolved.
      • Using Inserting Variables/VARA Objects in Objects and Scripts or other VARA objects requires you to specify the setting VAR_SECURITY_LEVEL in the UC_SYSTEM_SETTINGS - Systemwide Settings variable accordingly. Otherwise, the variables are not replaced (standard) and a database error occurs.
      • You can include PromptSet variables here when using the Dynamic Reload (Combobox Prompts) feature for combo box prompts. When you use PromptSet variables in a dynamic VARA object, the Preview feature returns an error. This is because the PromptSet variables do not exist in the dynamic VARA object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.

  2. Define the Data Types and Formatting.

  3. Define the Script Access.
  4. If you are logged in to Client 0, an additional section is available. For more information, see Client 0 VARA Objects in Other Clients.
  5. To run a command, select it and click Preview. The statements are executed and their results displayed. The preview function serves to check for potential errors in the database statements (for example, it the data type of the VARA object and of the database do not match).

    Example:

    select oh_name from oh

    where oh_otype = 'JOBI'

    and oh_deleteflag = 0

    and oh_client = &$CLIENT#

    order by oh_name asc

  6. Save your changes.

See also: