For each validation rule, you can set up conditions. The validation rule is only applied if the conditions are met.

To define a validation rule condition, you use a query. The validation rule is applied only to the records that are found by the query.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the records to which the validation rule applies. The inquiry only queries the table as defined for the validation rule.
  • Dynamic query: Use a dynamic query to define the records to which the validation rule applies. Before you can set up a condition with a dynamic query, set up the dynamic query to be applied. You can use a dynamic query, for example, to query other tables than the validation rule table, to define table relations, and to have only one record returned.

Data quality administrator Data quality administrator Start Start Use new dynamic query in  validation rule condition? Use new dynamic query in  validation rule condition? Set up dynamic query

Set up dynamic queries

Use a dynamic query to find one or more records in the database. The found records are the input for further processing.

You can use a dynamic query on:

  • An action rule of type Data query.
  • A condition that is applied to a validation rule, duplicate check rule, or action rule.
  • A configurable lookup of type Dynamic query. You can apply the configurable lookup on a validation rule of type Configurable lookup.

To define a query range, you can use a function.

Set up validation rule conditions Set up validation rule conditions For each validation rule, you can set up conditions. The validation rule is only applied if the conditions are met.To define a validation rule condition, you use a query. The validation rule is applied only to the records that are found by the query.You can use these types of queries:Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the records to which the validation rule applies. The inquiry only queries the table as defined for the validation rule.Dynamic query: Use a dynamic query to define the records to which the validation rule applies. Before you can set up a condition with a dynamic query, set up the dynamic query to be applied. You can use a dynamic query, for example, to query other tables than the validation rule table, to define table relations, and to have only one record returned.You can set up several conditions, using different query types. Procedure 1. Click Data quality management. 2. On the Data quality policies tab, in the list, click the link of the desired data quality policy. 3. On the Validation rules tab, in the list, find and select the desired validation rule. 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. 4. Click the Conditions tab. 5. Sub-task: Set up a condition using an inquiry. 6. Click Add. 7. In the Condition ID field, type a short descriptive name for the condition. 8. Click Edit query. 9. In the Criteria field, type a value. Note: You can extend the inquiry setup as desired. 10. Click OK. 11. Sub-task: Set up a condition using a dynamic query. 12. Click Add. 13. In the Condition ID field, type a short descriptive name for the condition. 14. In the Query type field, select 'Dynamic query'. 15. Usually the dynamic query is already set up. Select the applicable dynamic query. In the Dynamic query field, enter or select a value. Note: - If selected, you can review or edit the query by clicking Edit query. - If you do not select a dynamic query and you click Edit query, you can create a new dynamic query using the wizard. 16. Sub-task: Make condition active. 17. To apply a condition, make it active. Select the @DQS:IsActive check box. Note: You can also make all conditions for a validation rule active in one go. To do so, click Make all active. 18. Close the page. Notes If you define a condition and the applicable table for the rule is a date-effective or inheritance table, additional setup is required. The applicable table for the rule must be mapped to a related staging table or temporary table. End End No Yes

Activities

Name Responsible Description

Set up dynamic queries

Data quality administrator

Use a dynamic query to find one or more records in the database. The found records are the input for further processing.

You can use a dynamic query on:

  • An action rule of type Data query.
  • A condition that is applied to a validation rule, duplicate check rule, or action rule.
  • A configurable lookup of type Dynamic query. You can apply the configurable lookup on a validation rule of type Configurable lookup.

To define a query range, you can use a function.

Set up validation rule conditions

Data quality administrator

For each validation rule, you can set up conditions. The validation rule is only applied if the conditions are met.
To define a validation rule condition, you use a query. The validation rule is applied only to the records that are found by the query.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the records to which the validation rule applies. The inquiry only queries the table as defined for the validation rule.
  • Dynamic query: Use a dynamic query to define the records to which the validation rule applies. Before you can set up a condition with a dynamic query, set up the dynamic query to be applied. You can use a dynamic query, for example, to query other tables than the validation rule table, to define table relations, and to have only one record returned.
You can set up several conditions, using different query types.

Activities

Name Responsible Description

Set up dynamic queries

Data quality administrator

Use a dynamic query to find one or more records in the database. The found records are the input for further processing.

You can use a dynamic query on:

  • An action rule of type Data query.
  • A condition that is applied to a validation rule, duplicate check rule, or action rule.
  • A configurable lookup of type Dynamic query. You can apply the configurable lookup on a validation rule of type Configurable lookup.

To define a query range, you can use a function.

Set up validation rule conditions

Data quality administrator

For each validation rule, you can set up conditions. The validation rule is only applied if the conditions are met.
To define a validation rule condition, you use a query. The validation rule is applied only to the records that are found by the query.
You can use these types of queries:
  • Inquiry: Use the standard D365 FO Inquiry (SysQueryForm) page to define the records to which the validation rule applies. The inquiry only queries the table as defined for the validation rule.
  • Dynamic query: Use a dynamic query to define the records to which the validation rule applies. Before you can set up a condition with a dynamic query, set up the dynamic query to be applied. You can use a dynamic query, for example, to query other tables than the validation rule table, to define table relations, and to have only one record returned.
You can set up several conditions, using different query types.

Provide feedback