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

AVEVA™ Work Tasks

Data Binding Drop-Down Controls Using a Lookup Name (Parameterized)

Data Binding Drop-Down Controls Using a Lookup Name (Parameterized)

  • Last UpdatedJun 25, 2024
  • 1 minute read

You can populate the options of a drop-down control that is options binding, using a parameterized lookup name.

You can use any type of lookup (Database, Repository List or Web API for data binding options of Check Box, List, Drop-Down, or Radio Button control.

  1. Create a lookup with the name Products that is parameterized on Productcategory
    Let us consider that Products is a Database lookup with the following configuration:
    Query- select * from Products where ProductCategoryKey = @key
    Value- Products.ProductKey
    Display Name- ProductName

  2. Add a Drop-Down control to the form.

  3. Modify properties of the Drop-Down control as follows:

    1. In the Advanced tab, set the Text Parameter to ProductName and Value Parameter to ProductKey.

    2. In the Scripts tab, set the script for the Options property as follows:
      var parameterCollection = [
      {
      Name: "@key",
      Value: "Bikes"
      }];
      var lookupSchemaAndData = SFU.getLookupSchemaAndData("Products", parameterCollection);
      return lookupSchemaAndData.Data;

Related Links
TitleResults for “How to create a CRG?”Also Available in