--- title: "Set up validation rule of type Configurable lookup - Dynamic query" slug: "set-up-validation-rule-of-type-configurable-lookup-dynamic-query" description: "Learn to set up configurable lookup validation rules using dynamic queries to ensure data quality and compliance with defined standards." tags: ["Task topic"] updated: 2026-03-20T08:29:05Z published: 2026-03-20T17:44:40Z canonical: "docs.staedean.com/set-up-validation-rule-of-type-configurable-lookup-dynamic-query" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up validation rule of type Configurable lookup - Dynamic query Use validation rules to check if the data is in line with the defined standards. To validate data, you can use several validation types. This topic explains how to set up a configurable lookup validation rule with a configurable lookup of type '**Dynamic query**'. Use a: - Configurable lookup validation to add a custom lookup to a field and to validate if the field value matches a value as defined by the configurable lookup. - Configurable lookup of type '**Dynamic query**' to apply a dynamic query to define the possible options of a field. You can add validation rules in these ways: - Manually. - Select the fields to be validated from a page. > [!NOTE] > Note > > - If the field to which the configurable lookup is applied, already has a lookup, the configurable lookup overwrites the existing lookup. > - Before you can set up a configurable lookup validation rule, set up the configurable lookup to be used. ### Steps 1. Click **Data quality management**. 2. On the **Data quality policies** tab, in the list, click the link of the desired data quality policy. > [!NOTE] > Note > > If you want to edit another data quality policy version than the currently shown version, first select the desired version. To do so, on the **Action Pane**, on the **Version** tab, click **Versions**. On the dialog, select the desired version and click **OK**. 3. Sub-task: Manually create validation rule. 1. You can manually create a validation rule and define the table and field which value must be validated. On the **Validation rules** tab, click **Add**. 2. Define the table of the field which value must be validated. In the **Table** field, enter or select a value. > [!NOTE] > Note > > If you want to validate field values in inherited tables, define the child table instead of the base table. For example, instead of DirPartyTable, use DirOrganization or DirPerson. 3. Define the field which value must be validated. In the **Field** field, enter or select a value. 4. Sub-task: Create validation rules by selecting fields. 1. You can create validation rules by selecting the fields, which value must be validated, from a page. On the **Validation rules** tab, click **Select** fields. 2. Open the page from which you want to select fields. 3. On the **Field picker** dialog, click **Select** fields. 4. Click the **'+'** button for each field that you want to select. 5. On the **Field picker** dialog, click **Done**. 6. On the **Field picker** dialog, click **Submit** to save the selected fields to the validation rule. 5. Define to which records the validation rule is applied. You can apply a validation rule to: In the **Record type** field, select an option. - New records only. - Existing records only. - New records and existing records. 6. In the **Validation type** field, select '**Configurable lookup**'. 7. Define when the validation rule is applied: In the **Event** field, select an option. > [!NOTE] > Note > > The configurable lookup is added to the defined field when the page is opened. - **Field**: The validation rule is applied just before the standard field validation is done. - **Record**: The validation rule is applied just before the standard record validation is done. 8. Define what is done if the validation rule is not met: In the **Outcome** field, select an option. > [!NOTE] > Note > > For each validation rule, you can define a message to be shown. If you do not define a validation rule message, in case of a warning or error, a default message is shown. - **Warning**: A warning message is shown. The record or the field value is saved. - **Error**: An error message is shown. The record or the field value is not saved. - **No validation**: Only the configurable lookup is added to the field. No validation is done. Example: You can use the configurable lookup to show a list with often-used values for the field. However, you can enter other values as well. 9. In the **Configurable lookup** field, enter or select a configurable lookup of type '**Dynamic query**'. 10. Sub-task: Set the desired query ranges and range values. 1. If you apply a configurable lookup of type **Dynamic query**, you can use ranges to filter the values that the applicable dynamic query gets. In the configurable lookup, from the records that the dynamic query gets, only the ones are shown that meet the range settings. Click **Add**. 2. Define the ranges to be applied to the configurable lookup. In the **Range** field, enter or select a value. > [!NOTE] > Note > > To define a range, you can only use dynamic query fields that are set as range in the applicable configurable lookup setup. 3. To set a range, you can use these types of values: In the **Value type** field, select an option. - **Field**: Define a field based on which value the configurable lookup is filtered. The field value is taken from the validated record. - **Fixed value**: Define a fixed value based on which the configurable lookup is filtered. - **Custom**: Use a custom class and custom method to filter the configurable lookup. 4. In the **Condition type** field, select an option. 5. If the **Value type** is **Field**, define the field based on which value the configurable lookup is filtered. In the **Field name** field, enter or select a value. > [!NOTE] > Note > > Usually, you define the same field as the field that is used for the range. 6. If the **Value type** is **Fixed value**, define the value based on which the configurable lookup is filtered. In the **Fixed value** field, enter or select a value. 7. If the **Value type** is **Custom**, define the custom class with the method that you use to filter the configurable lookup. In the **Class name** field, enter or select a value. > [!NOTE] > Note > > The custom class must extend the **DQSCustomValidationBase** class. 8. If the **Value type** is **Custom**, define the method that you use to filter the configurable lookup. The method must exist in the defined custom class. In the **Method name** field, enter or select a value. 11. Close the page. ## Related - [Set up validation rule of type Configurable lookup](/set-up-validation-rule-of-type-configurable-lookup-flow.md)