Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Lookup Settings

  • Last UpdatedJul 01, 2024
  • 7 minute read

You can package and deploy Database Lookup and List Lookup along with its associated and child artifact from one environment or repository to another environment or repository.

To add Lookup Settings to Package Template

  1. Log on to the Enterprise Console.

  2. In the Enterprise Console, click menu icon, click Settings, and then click Lookup Settings.

    The Lookup List window appears.

  3. Select the lookup item that you want to package.

  4. Right-click the lookup, and then click Add to Package Template.

    The Add to Package Template window appears.

    For more information about adding artifacts to Package Template, see Adding Artifacts to a Package Template.

    You can set the configuration properties of lookup in the Add to Package Template window. The left side of the configuration window shows the package template and its configurations. You can set the configuration properties of the lookup package in the Settings form on the right side of the Add to Package Template window.

    When you select the Include Associated Artifacts option as Yes while adding the lookup to a package template, the associated artifacts are added to the package template. You can then view the associated artifacts of a lookup in the tree view of a package. If you select the Include Associated Artifacts option as No, the associated artifacts are not added to the package template. Then, you cannot see the associated artifacts in the tree view of a package. This condition holds good for both the Include Child Artifacts and Include Security Artifacts options as well.

    When you select the Include the automatically generated SQL Script option as Yes while adding the lookup to a package template, the automatically generated SQL script is included in the package template. If you select the Include the automatically generated SQL Script option as No, the automatically generated SQL script is not included in the package template.

Configuration settings for Lookup

Lookup has a unique set of configuration settings required to install, update, and uninstall the package. You can view and edit the configuration settings from one of the following windows:

  • Source Environment > Package Template window

  • Target Environment > Manage Package window

Settings Tab

You can define the configuration settings of a lookup artifact in the Settings tab. Set the properties in this tab to take appropriate actions while installing, updating, or uninstalling the package.

Install

You can use this tab to set the configurations for installing the package. When you install a package containing a lookup using stored procedure, you must create stored procedure with the same name.

  • Lookup exists: Use this property to take appropriate action when the lookup which is installed is present in the target environment.

    • Do not install Lookup: Select this option to use the lookup which is present in the target environment.

    • Install to overwrite existing Lookup: Select this option to overwrite the lookup which is present in the target environment with the one that is currently being packaged.

  • Associated artifacts not present: Use this property to take appropriate action when the associated artifacts of the lookup is not present in the target environment.

    • Install Lookup: Select this option to install the lookup, even if the associated artifacts are not present in the target environment.

    • Do not install Lookup: Select this option if you do not want to install the lookup as its associated artifacts are not present.

  • SQL script: When a lookup contains a query or a procedure, while adding the lookup to the package template, a script is generated and populated in the SQL script text area. While installing the package in the target environment, the SQL script is run first and then the package is installed.

    If the lookup contains a query, the script will be generated for the tables in the query. Parent tables and child tables are not considered. Such a query will contain the following information:

    • Table structure of the tables in the query, with field name, data types, and their order

    • Keys - primary key and foreign key

    • Constraints - default or check, and so on

    • Index

      If the lookup contains a procedure, a script for the procedure is generated. However, objects such as tables or views used by the procedure are not generated. All such objects must be available in the target environment before package installation.

      The following points are not considered while generating the SQL script:

    • User defined types

    • Table partitioning

    • Views

    • Triggers

    • Functions

    • Synonyms

    • Parent and child tables

    • Query against views and functions

      If you need any of the unsupported objects, then you can choose to do one of the following:

    • Write and run the script manually in SQL Server

    • Write and append the script to the SQL script text area

      The auto-generated script contains a pre-condition statement which checks for the existing tables in the target environment. If the table exists in the target environment, the SQL script does not run. If the table does not exist in the target environment, the SQL script runs and creates the table, and adds the keys, index, constraints as defined in the source environment.

      Ensure that the object names used in the source repository does not conflict with the destination repository. If any of the objects (name of a table, key, constraint, or index) exists in the target environment, then the script execution will fail. This will be recorded in Package History page after the package installation.

      As the script is auto-generated, we recommend not to modify the script. If you want to add your own piece of code sample to the script, you can either add it at the start of the script or append it to the end of the script. Do not add or edit the existing script.

      Generating scripts for Oracle database is not supported. The SQL script text box will not be visible when the database in source environment is Oracle.

Update

Use the settings in this tab to update an installed package.

  • Delete Lookup: Select this property to delete the lookup which is present in the target environment.

    • Yes: Select this option to remove the lookup from the target environment.

      Lookup is modified: Use this option to retain or delete the lookup in the target environment even after the package is updated. This property is applicable only if Delete Lookup is set to Yes and the lookup is modified.

      • Retain: Select this option to retain the lookup along with the modifications, in the target environment even after the package is uninstalled.

      • Rollback to original state: Select this option to rollback the lookup to the original state. All modifications that were done to the lookup after it was installed in the target environment will be reverted. However, the lookup will be retained in the target environment.

      • Delete: Select this option to delete the Lookup from the target environment when uninstalling the package.

    • No: Select this option to retain the lookup in the target environment.

      Lookup exists Select this option to take appropriate action when the lookup that is being installed is present in the target environment.

      • Do not install Lookup: Select this option to use the lookup which is present in the target environment.

      • Install to overwrite existing Lookup: Select this option to overwrite the lookup which is present in the target environment with the one that is currently being packaged.

        Associated artifacts not present: Select this option to take appropriate action when the associated artifacts of the lookup is not present in the target environment.

      • Update Lookup: Select this option to update the lookup.

      • Do not update Lookup: Select this option if do not want to update the lookup as associated artifacts are not present.

Uninstall

Use this tab to configure the settings when the package is being uninstalled from the target environment.

  • Delete Lookup: Select this property to retain or delete the lookup in the target environment even after the package is uninstalled.

    • Yes: Select this option to remove the lookup from the target environment when the package is uninstalled.

    • No: Select this option to retain the lookup in the target environment even after the package is uninstalled.

  • Lookup is modified: Use this property to retain, rollback to original state, or delete the lookup in the target environment even after the package is uninstalled. This property is displayed only if Delete Lookup is set to Yes. However, if Delete Lookup is set to No, this property is not displayed.

    • Retain: Select this option to retain the lookup along with the modifications, in the target environment even after the package is uninstalled.

    • Rollback to original state: Select this option to rollback to the original state. All modifications that were done to the lookup after it was installed in the target environment will be reverted. However, the lookup will be retained in the target environment.

    • Delete: Select this option to delete the lookup from the target environment when uninstalling the package.

Note:

- The SQL script does not run when the package is installed in update mode.

- Changes made to the package through SQL scripts will not be reverted during package uninstallation.

- Database Lookup script will be executed against the target database specified in Database connection artifact which is an associated artifact for the Lookup.

Associated Artifacts of Lookup

The Associated Artifacts tab displays all the associated artifacts of the selected lookup.

The following artifacts can appear as an associated artifact, if you are using any one of the following artifacts while designing the lookup:

  • Parent Folder

  • Database Connection (Query, Stored Procedure)

  • Manage List

  • Web API List

Child Artifacts of Lookup

Lookup does not have any child artifact.

Include Child Item

For more information, see Include Child Item.

Security Artifacts of Lookup

The Security Artifacts tab displays all the security artifacts of lookup, if any.

You can enable the security settings of the lookup that you want to include in the package. For more information about including security artifacts, see Include Security Artifacts.

Note:

- Along with a Manage List containing Lookup display value, the list items will be packaged and installed in the target environment. The lookup display value will be blank in case the lookup display value in target environment does not match the lookup in the source environment.

- If a stored procedure used within the product is already existing in the target machine, then the user has to handle the stored procedure before installing the package

In This Topic
TitleResults for “How to create a CRG?”Also Available in