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 the Configurable lookup validation type.

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.

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.

For each validation rule, you can set up:
  • A validation message that is shown if the validation rule is not met.
  • Conditions to define the data to which the rule applies. For example, you can apply a configurable lookup based on the value of another field. So, depending on the value entered for the other field, a different configurable lookup is shown. To do so, set up a separate validation rule for each condition.

Data quality administrator Data quality administrator The data quality administrator (DQSDataQualityAdministrator) can set up and maintain: Data quality policies Data quality studio parameters Data quality studio general setup Start Start Configurable lookup  exists? Configurable lookup  exists? Set up configurable lookup

Set up configurable lookup

You can set up a configurable lookup to define the possible options in a field.

You can define the possible options for a configurable lookup in these ways:

  • User defined list: Set up the desired options manually.
  • Dynamic query: Apply a dynamic query to define the desired options.
  • Web service: Use a web service to get the desired options.

To apply a configurable lookup, set up a validation rule of type Configurable lookup. You can use a configurable lookup on several validation rules.

This topic explains how to set up a configurable lookup.

What type of  configurable lookup? What type of  configurable lookup? Set up validation rule of type Configurable lookup - User defined list Set up validation rule of type Configurable lookup - User defined list 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 with a configurable lookup of type 'User defined list'.  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 'User defined list' to manually define the possible options in a field. You can add validation rules in these ways: Manually. Select the fields to be validated from a page. 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. 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. 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. 4. On the Validation rules tab, click Add. 5. Define the table of the field which value must be validated. In the Table field, enter or select a value. 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. 6. In the Field field, enter or select a value. 7. Sub-task: Create validation rules by selecting fields. 8. On the Validation rules tab, click Select fields. 9. Open the page from which you want to select fields. 10. On the Field picker dialog, click Select fields. 11. Click the '+' button for each field that you want to select. 12. On the Field picker dialog, click Done. 13. On the Field picker dialog, click Submit to save the selected fields to the validation rule. 14. In the Record type field, select an option. 15. In the Validation type field, select 'Configurable lookup'. 16. Define when the validation rule is applied: 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. In the Event field, select an option. Note: The configurable lookup is added to the defined field when the page is opened. 17. Define what is done if the validation rule is not met: 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. In the Outcome field, select an option. 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. 18. In the Configurable lookup field, enter or select a configurable lookup of type 'User defined list'. 19. Close the page. Set up validation rule of type Configurable lookup - Dynamic query 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: 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. 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. 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. 4. On the Validation rules tab, click Add. 5. Define the table of the field which value must be validated. In the Table field, enter or select a value. 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. 6. In the Field field, enter or select a value. 7. Sub-task: Create validation rules by selecting fields. 8. On the Validation rules tab, click Select fields. 9. Open the page from which you want to select fields. 10. On the Field picker dialog, click Select fields. 11. Click the '+' button for each field that you want to select. 12. On the Field picker dialog, click Done. 13. On the Field picker dialog, click Submit to save the selected fields to the validation rule. 14. In the Record type field, select an option. 15. In the Validation type field, select 'Configurable lookup'. 16. Define when the validation rule is applied: 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. In the Event field, select an option. Note: The configurable lookup is added to the defined field when the page is opened. 17. Define what is done if the validation rule is not met: 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. In the Outcome field, select an option. 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. 18. In the Configurable lookup field, enter or select a configurable lookup of type 'Dynamic query'. 19. Sub-task: Set the desired query ranges and range values. 20. Click Add. 21. Define the ranges to be applied to the configurable lookup. In the Range field, enter or select a value. Note: To define a range, you can only use dynamic query fields that are set as range in the applicable configurable lookup setup. 22. In the Value type field, select an option. 23. In the Condition type field, select an option. 24. 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: Usually, you define the same field as the field that is used for the range. 25. In the Fixed value field, enter or select a value. 26. 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: The custom class must extend the DQSCustomValidationBase class. 27. In the Method name field, enter or select a value. 28. Close the page. Set up validation rule of type Configurable lookup - Web service Set up validation rule of type Configurable lookup - Web service 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 'Web service'.  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 'Web service' to get the possible options of a field from a web service. You can add validation rules in these ways: Manually. Select the fields to be validated from a page. 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. 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. 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. 4. On the Validation rules tab, click Add. 5. Define the table of the field which value must be validated. In the Table field, enter or select a value. 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. 6. In the Field field, enter or select a value. 7. Sub-task: Create validation rules by selecting fields. 8. On the Validation rules tab, click Select fields. 9. Open the page from which you want to select fields. 10. On the Field picker dialog, click Select fields. 11. Click the '+' button for each field that you want to select. 12. On the Field picker dialog, click Done. 13. On the Field picker dialog, click Submit to save the selected fields to the validation rule. 14. In the Record type field, select an option. 15. In the Validation type field, select 'Configurable lookup'. 16. Define when the validation rule is applied: 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. In the Event field, select an option. Note: The configurable lookup is added to the defined field when the page is opened. 17. Define what is done if the validation rule is not met: 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. In the Outcome field, select an option. 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. 18. In the Configurable lookup field, enter or select a configurable lookup of type 'Web service'. 19. Sub-task: Set up a request parameter override of type Field. 20. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with the value of a field. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 21. In the Parameter type field, select 'Field'. 22. In the Field name field, enter or select a value. Note: You can only select a field from the table that is defined for the validation rule. 23. Sub-task: Set up a request parameter override of type Custom. 24. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with a value that is defined by a custom method. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 25. In the Parameter type field, select 'Custom'. 26. Define the custom class that is used to define the parameter value. In the Class name field, enter or select a value. Note: You can only select classes that extend the DQSWebServiceParametersBase base class. This custom class must have a return method that returns a value. 27. In the Method name field, enter or select a value. 28. Sub-task: Set up a request parameter override of type Fixed value. 29. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with a fixed value. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 30. In the Parameter type field, select 'Fixed value'. 31. In the Parameter value field, type a value. 32. Sub-task: Set up response parameter. 33. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. Indicate which response parameters are used to define the configurable lookup values. For each of the used response parameters, set up a condition to define which response values from the web service are valid. A condition has a type and a value. For each of the used response parameters, the condition must be met. On validation, the process is: Send request to web service. Web service gives response values. Apply the condition for each used response value. Result: The validation rule is only met if for each used response parameter, the condition is met. On the Properties tab, for the desired Response parameter, select the Use as a response parameter check box. Note: If a Custom response handler is defined for the web service, no Response parameters are available. 34. In the Condition type field, select an option. 35. In the Parameter value field, type a value. 36. Sub-task: Set up response parameter override. 37. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. You can process a Response value, as received from the web service, before you use it to validate a value in D365 F&SCM. You can only do so with a custom class and method. On validation, the process is: Send request to web service. Web service gives a response. Process response with custom method. Get response from custom method. Apply the condition for each used response value. Result: The validation rule is only met if for each used response parameter, the condition is met. On the Properties tab, for the desired Response parameter, select the Override setup check box. Note: Select this check box for each response parameter for which you also select the Use as response parameter check box. If a Custom response handler is defined for the web service, no Response parameters are available. 38. Indicate which response parameters are used to define the configurable lookup values. For each of the used response parameters, set up a condition to define which response values from the custom method are valid. A condition has a type and a value. For each of the used response parameters, the condition must be met. Select the Use as a response parameter check box. Note: Select this check box for each response parameter for which you also select the Override setup check box. 39. Define the custom class that is used to process the web service response and that returns the value that is used as input for the condition. In the Class name field, enter or select a value. Note: You can only select classes that extend the DQSWebServiceParametersBase base class. This custom class must have a return method that returns a value. 40. In the Method name field, enter or select a value. 41. In the Condition type field, select an option. 42. In the Parameter value field, type a value. 43. Close the page. Show message when  validation rule is not met? Show message when  validation rule is not met? Set up validation rule message Set up validation rule message You can define a message that is shown if the validation rule is not met.If no validation rule message is defined, the default message is shown if the validation is not met.In case of a data pattern validation, the applicable data pattern can also have a message defined. In this case, the message priority is:If a validation rule message is defined, this message is shown.If no validation rule message is defined, the data pattern message is shown.If no data pattern message is defined, the default message is shown.You can also enter a description of the validation rule.You can translate both the validation message and the validation rule description. 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. Click Edit. 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. On the Validation rules tab, in the list, find and select the desired validation rule. 5. Click the Messages tab. 6. In the Validation message field, type a value. 7. In the Rule description field, type a value. 8. Sub-task: Translate validation message and description. 9. Click Translations. 10. Click Add to open the drop dialog. 11. In the list, find and select the desired language. 12. Click OK. 13. In the Rule description field, type the translation of the validation rule description. 14. In the Message field, type the translation of the validation message. Note: In the validation message translation, you can use these tags: Field name: When the validation message is shown, the [Field name] tag is replaced with the name of the validated field. Field value: When the validation message is shown, the [Field value] tag is replaced with the value that is entered in the validated field. To add a tag to the validation message translation, click Message tags, and click the desired tag. 15. Close the page. 16. Close the page. Does the validation rule  apply to specific data? Does the validation rule  apply to specific data? 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 F&SCM 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.

End End No Yes User  defined  list Dynamic  query Web service Yes No Yes No

Activities

Name Responsible Description

Set up configurable lookup

Data quality administrator

You can set up a configurable lookup to define the possible options in a field.

You can define the possible options for a configurable lookup in these ways:

  • User defined list: Set up the desired options manually.
  • Dynamic query: Apply a dynamic query to define the desired options.
  • Web service: Use a web service to get the desired options.

To apply a configurable lookup, set up a validation rule of type Configurable lookup. You can use a configurable lookup on several validation rules.

This topic explains how to set up a configurable lookup.

Set up validation rule of type Configurable lookup - User defined list

Data quality administrator

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 with a configurable lookup of type 'User defined list'. 

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 'User defined list' to manually define the possible options in a field.

You can add validation rules in these ways:

  • Manually.
  • Select the fields to be validated from a page.

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.

Set up validation rule of type Configurable lookup - Dynamic query

Data quality administrator

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:

  • 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.

Set up validation rule of type Configurable lookup - Web service

Data quality administrator

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 'Web service'. 

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 'Web service' to get the possible options of a field from a web service.

You can add validation rules in these ways:

  • Manually.
  • Select the fields to be validated from a page.

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.

Set up validation rule message

Data quality administrator

You can define a message that is shown if the validation rule is not met.
If no validation rule message is defined, the default message is shown if the validation is not met.
In case of a data pattern validation, the applicable data pattern can also have a message defined. In this case, the message priority is:
  1. If a validation rule message is defined, this message is shown.
  2. If no validation rule message is defined, the data pattern message is shown.
  3. If no data pattern message is defined, the default message is shown.
You can also enter a description of the validation rule.
You can translate both the validation message and the validation rule description.

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 F&SCM 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.

Activities

Name Responsible Description

Set up configurable lookup

Data quality administrator

You can set up a configurable lookup to define the possible options in a field.

You can define the possible options for a configurable lookup in these ways:

  • User defined list: Set up the desired options manually.
  • Dynamic query: Apply a dynamic query to define the desired options.
  • Web service: Use a web service to get the desired options.

To apply a configurable lookup, set up a validation rule of type Configurable lookup. You can use a configurable lookup on several validation rules.

This topic explains how to set up a configurable lookup.

Set up validation rule of type Configurable lookup - User defined list

Data quality administrator

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 with a configurable lookup of type 'User defined list'. 

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 'User defined list' to manually define the possible options in a field.

You can add validation rules in these ways:

  • Manually.
  • Select the fields to be validated from a page.

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.

Set up validation rule of type Configurable lookup - Dynamic query

Data quality administrator

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:

  • 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.

Set up validation rule of type Configurable lookup - Web service

Data quality administrator

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 'Web service'. 

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 'Web service' to get the possible options of a field from a web service.

You can add validation rules in these ways:

  • Manually.
  • Select the fields to be validated from a page.

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.

Set up validation rule message

Data quality administrator

You can define a message that is shown if the validation rule is not met.
If no validation rule message is defined, the default message is shown if the validation is not met.
In case of a data pattern validation, the applicable data pattern can also have a message defined. In this case, the message priority is:
  1. If a validation rule message is defined, this message is shown.
  2. If no validation rule message is defined, the data pattern message is shown.
  3. If no data pattern message is defined, the default message is shown.
You can also enter a description of the validation rule.
You can translate both the validation message and the validation rule description.

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 F&SCM 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.

Provide feedback