Data Rules

2 | Data Rules Advanced

This article covers an advanced overview of Data Rules such as using Custom Fields and Setting Field Views. Following up from the Data Rules Introduction article, this piece provides an in-depth overview of some of the key features of Data Rules. These features include using Filters while creating Data Rules, using custom fields (i.e., the additional fields created for Operator's convenience), and using multiple Data Rules for the same field.

This article covers an advanced overview of Data Rules such as using Custom Fields and Setting Field Views.

    Following up from the Data Rules Introduction article, this piece provides an in-depth overview of some of the key features of Data Rules. These features include using Filters while creating Data Rules, using custom fields (i.e., the additional fields created for Operator's convenience), and using multiple Data Rules for the same field.

    With the advanced setups, complex rules can be created so that valid and required information is entered into the database.

    Prerequisites 

    • To access Data Rule Settings, the applicable Operator Privileges   will need to be enabled 
      • Operator Maintenance 'General' Tab
        • System Setup: "Maintain Data Rules" Flag 

    Set Field View as Qualifier

    •  As mentioned in the Introduction article , if Set Field Value is selected as Qualifier, the data entered into the Rule Data 1 field will be applied to the fields mentioned in the filter
    • An example has been given below to demonstrate this setting

    • The Data Rule in this example will be applied to Products mentioned in the Filter 1
    • By selecting Set Field Value as the Qualifier with the Rule Data 1 of '2', any Product that is Added or Edited will have '2' set in the MaxSalesQty Field within the Product Settings


    • When adding a New Product , the MaxSalesQty will initially display the Value from the Copied Product; the Value will change to the Data Rule upon being saved

    • Rather than applying the Data Rule to all Products, a filter can be used to limit the Products that it will apply to
    • Using the filter in this example, the Data Rule will only apply to Products which belong to specific Product Types (ProdType Field Name)
    • Using the Qualifier Between or Equal To, the Filter Data refers to the Product Type Number rather than the Type Name and will apply the Rule to all Products which belong to Product Types between or equal to Product Type Numbers 17 through 21 in the given example

    • The Product Numbers can be located within the Sorts & Types tab of Global Settings


    Using Custom Fields

    • Custom Fields are used in Data Rules similarly as other Field Names with an exception that Custom Info/Fields need to be referred back as these fields will display in the Field Name Selector of the Data Rule window by their Numbered Order

    • In this example, the field name CustomDate_1 in the Data Rule window matches the Custom Date Field labeled Wedding Anniv. in the Member Maintenance Custom Info tab


    Using Multiple Data Rules

    • Multiple Data Rules can be used in conjunction with each other to require some parts of the database to be set up in a specific way
    • I.e., When adding a New Supplier or Editing an Existing Supplier, of a valid Phone Number and require certain Custom Info fields to be utilized

    • After the Data Rules have been set, all the required fields need to be set in the database


    Advanced Examples

    Example 1

    • This Data Rule is requiring a Valid Email to be Entered into the Email 1 Field when Email is chosen as the Best Contact Method for the Supplier
    • To validate this rule, "Best Contact Method" is added as a Custom Text Field for Supplier

      


    Example 2

    • This Data Rule requires a Valid Australian Phone Number to be entered into the Work Phone Field of the Address Details for the Suppliers

     


    Example 3

    • This Data Rule requires a Valid Date to be entered for the CustomDate_2 Field which has been designated as Next Order date in supplier Custom Info; by setting the Qualifier to later than and the Rule Data 1 as of March 1, 2017
    • The Data entered in for Rule Dat is arbitrary as long as it is a past date which then requires the selected data to be in the future



    Example 4 

    • This Data Rule requires a selection to be made in the CustomText_1 Field by using the Qualifier Contains with the Rule Data1 day
    • In the given example, all of the possible entries for the Custom text Field contain 'day' which will force a selection to be made

     


    Example 5

    • This Data Rule requires a selection to be made in the CustomText_4 field by using the Qualifier Length More Than with the Rule Data 1 0(zero)
    • This is one of the simplest methods for requiring data entry/ selection in a text field; if the length of the Data must be More Than Zero, something needs to be entered or selected