Creating and testing data validation rules

Create and test data validation rules in your sandbox environment. Thoroughly test the rules, thinking about all of the different scenarios where each rule might fail. Testing will ensure that productivity isn't negatively impacted for the users processing the records if there are issues with rules. When the rules have been tested and approved, recreate them in your production environment.

Note: Data Stewards, Data Managers, and System and Data Admin users will be impacted by data validation rules when they are processing record changes. They are added to all rules by default.

Consider the following when you are working with data validation rules:

  • Use reports to analyze the data before implementing rules; for example, run a report to see how many HCP records do not list a specialty. This will help you to know how many records a rule will fail on and how often users will be interrupted by messages.
  • If you create rules that include fields that are not part of the profile layout, the rules might trigger, but users cannot see the field on the profile page to fix the issue.
  • Identify a support process. Users processing the records should know who they can contact if they have issues with the rules.
  • To set up many rules for a large list of countries, set up a template by creating a rule with the countries selected. Leave the rule disabled but copy it to create new rules. This way, you don't have to select the countries for each new rule.
  • Create separate rules when the criteria are different.

    Example: If you want to create a validation rule to ensure that all HCP addresses in China, Japan, and Australia include state information, but in Japan you want to validate this on active addresses only, you must create two separate rules.

     Rule 1Rule 2
    CountryJapanChina, Australia
    Object TypeAddressAddress
    Filters Field = Status
    Condition = Equals
    Value = Active
    Conditions Field = State/Province
    Condition = Is Null
    Field = State/Province
    Condition = Is Null

    For more examples, see Using filters and conditions in validation rules.

    Considerations for inactive reference codes

    When you're working with data validation rules, all active reference codes for each entity (HCP, HCO, and HCP & HCO) are available to use for data validation rules. Only reference codes that are completely inactive (all countries have been moved to the inactive list, or the code is made inactive) will not be shown. Any reference codes set to be inactive for a particular country will be hidden from the drop-down lists. This will be determined by the countries that you choose in each rule. Any code that is active in at least one of the selected countries will be available to use in the rule.

    If a rule uses a reference code that is later inactivated, nothing changes. The rule might not work because no records use that code, but the rule itself will exist and no errors will occur. If an administrator changes the rule and selects another code, the now-inactive code will not be available for selection in the drop-down list. This behavior is consistent with the behavior of inactive reference codes in other parts of the Network user interface.

    Also, if an inactive reference code exists in a rule and an administrator changes the rule, the inactivated code will be missing from the drop- down list and the value will be empty. If the administrator makes other changes on the rule, the Save button will be enabled, but if the value of the reference data is not re-selected from the drop-down list, the data validation rule cannot be saved and an error displays about the missing value.

    If a reference code is activated or inactivated for a country, the reference code drop-down list can be refreshed using one of the following ways:

    • changing the country
    • expanding the rule
    • refreshing the page

    For more information about reference codes, see Inactivating reference codes.