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

AVEVA™ Production Management

Configure allowed values filtering for multi-column drop-downs

Configure allowed values filtering for multi-column drop-downs

  • Last UpdatedMar 12, 2025
  • 4 minute read

The procedure described in this sample configuration topic applies to the following modules: Downtime, Production, Maintenance, Quality, Knowledge, Planning, Energy.

This topic provides an example of how to set up custom fields with drop-down lists populated by an OLE-DB connection with allowed values filtering. Allowed values filtering makes it possible for values in the drop-down list to change depending on the values of other fields in that same record.

In the following screen, the selections of Body and Make determine that only fields with the selected values appear in the multi-column drop-down table.

Note: Only custom fields can be set up for allowed values filtering as only custom fields have the AllowedValuesFilterFields property. However, standard fields such as Cause and Location can be used as source fields into the custom field.

Production Analyst Add Record dialog box showing the standard tab input form with filtering applied.

Sample configuration: Allowed values filtering for multi-column drop-downs

In this sample configuration, you are going to configure a multi-column lookup list with allowed values filtering. This procedure can be performed on a custom field in any supported module; however, this example uses a Production reporting point.

Note: The parameter names, fields, column names in the properties, and the returned columns from the Stored Proc are all case sensitive.

Studio configuration

  1. Create a Production reporting point with three custom fields: Body, Make, Model.

    Studio project hierarchy view showing an expanded reporting point with three custom fields.

  2. On each of the fields, set the following properties:

    Property

    Value

    DataType

    String

    AllowedValuesType

    OleDb

    The AllowedValuesFilterFields property appears.

    Studio Properties pane highlighting Allowed Values Filter Fields in Details Display section.

  3. Set the following properties for the Body field.

    Property

    Value

    AllowedValuesFilterFields

    Make, Model

    AllowedValuesKeyColumn

    BodyTypeColumn

    AllowedValuesDisplayColumn

    BodyTypeColumn, MakeColumn, ModelColumn

  4. Set the following properties for the Make field.

    Property

    Value

    AllowedValuesFilterFields

    Body, Model

    AllowedValuesKeyColumn

    MakeColumn

    AllowedValuesDisplayColumn

    BodyTypeColumn, MakeColumn, ModelColumn

  5. Set the following properties for the Model field.

    Property

    Value

    AllowedValuesFilterFields

    Body, Make

    AllowedValuesKeyColumn

    ModelColumn

    AllowedValuesDisplayColumn

    BodyTypeColumn, MakeColumn, ModelColumn

Setting up Ole-DB data source

In order for this field to populate its allowed values, point the AllowedValuesSource property to an OleDBAdapter.

Studio Project Explorer and Properties pane showing how the connector field is populated with allowed values.

  1. Add an Ole-DB data source to the Studio project.

  2. Under the data source, add an Ole-DB connection.

  3. Assign permissions on the Ole-DB Connector to all users who access this function. The multi-column drop-down menu appears empty if the user does not have admin permissions or specific permissions to access the Ole-DB Connector.

    Studio project hierarchy view showing an expanded Enterprise folder with list of connector datasource elements.

  4. Add three Ole-DB Adapter items and name them GetBody, GetMake, and GetModel.

  5. For each adapter, under the SelectCommand property, next to Parameters, Click Browse (...) to open the Collection Editor and define the collections of parameters. It is important to check that the order of these parameters, as entered in the SelectCommand property, matches the order of the parameters in the stored procedure or SQL statement.

    For the GetBody adapter:

    Property

    Value

    CommandText

    EXEC SP_GetBody ?, ?

    Parameters

    Make, Model

    For the GetMake adapter:

    Property

    Value

    CommandText

    EXEC SP_GetMake ?, ?

    Parameters

    Body, Model

    For the GetModel adapter:

    Property

    Value

    CommandText

    EXEC SP_GetModel ?, ?

    Parameters

    Body, Make

    Studio Project Explorer and Properties pane highlighting the field and property, and shhowing how the Parameter field Collection Editor lookup window is populated with the custom fields.

    Setting up SQL database

    The logic in determining the allowed values based on other field values is handled by means of a SQL query or stored procedure.

    A simple example would be to set up a SQL table to be used as a matrix. In this example we have three fields; Make, Model and Body Type, where the allowed values of each field are dependent on the other two fields.

    SQL Server Management Studio Interface showing Object Explorer pane with selected table and its records on the right in a tab with table grid.

    You can query the table directly with an SQL statement or more conveniently with a stored procedure. The stored procedure is called with the CommandText property in the adapter. The stored procedure or SQL query may also have to handle scenarios where one or more fields have an empty value.

    SQL Server Management Studio interface showing a selected stored procedure and on the right its corresponding SQL statement for table query,

    View the Multi-Column List

    After your project is properly configured, the allowed values of a drop-down list box change in accordance to the values of dependent fields.

    Multi-column list without filtering applied

    In this screen, there is no filtering applied to the data supplied by the external SQL database.

    Production Analyst Add Record dialog box showing the standard tab with multi-column list without filtering applied.

    Multi-column list with filtering applied

    In this screen, the selections made in the Body and Make fields applies filtering to the available data.

    Production Analyst Add Record dialog box showing the standard tab with multi-column list without filtering applied.

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