Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: How To (Forms, Reports, and more) > Data Designer (RBDefine) > The Data Designer

Rules

Scroll Prev Top Next More

The "Rules" option allows you to create predefined or custom rules for a table. Rules can be set to work with data entry and data deletion. A data entry rule ensures that the data entered into a column meets the criteria you specify. A data deletion rule ensures that data deleted in a column also meets specified criteria.

 

When you enter/edit or delete data, R:BASE checks the data with the corresponding rules. If the conditions of a particular rule are not met, R:BASE displays the error message defined for that rule. Rules can even be set to fail to meet conditions, and otherwise, R:BASE displays the error message defined for that rule.

 

Add Rule - create a new rule for a column, by opening the "New Rule" dialog. This dialog box corresponds to the RULES command.

 

Modify Existing Rule - opens the New Rule dialog to edit the existing rule definition

 

Delete Rule - deletes the currently selected rule

 

Save - commits any changes made since the last save

 

Save with "NOCHECK" - commits any changes made since the last save, and does not update references to views, tables, and columns in forms, reports, labels, access rights, and rules. In this case, the user assumes the responsibility to update any references to views, tables, and columns in forms, reports, labels, access rights, and rules.

 

Help - opens the Data Designer Help

 

Save and Close - commits any changes made since the last save and closes the Data Designer module

 

Save and Close with "NOCHECK" - commits any changes made since the last save, closes the Data Designer module, and does not update references to views, tables, and columns in forms, reports, labels, access rights, and rules. In this case, the user assumes the responsibility to update any references to views, tables, and columns in forms, reports, labels, access rights, and rules.

 

Close - closes the Data Designer module. If unsaved changes have been made, you will be prompted to save them before closing.

RBD_Rule_Group

 

You can use rules to do the following:

 

Prevent duplicate information from being entered. For example, a new stock number cannot be the same as an existing one.

Verify that the data being entered corresponds with data elsewhere in the database. For example, the product stock number must exist in a table before you enter a sales transaction for the product.

Prevent a row from being deleted if it corresponds with data elsewhere in the database. For example, if a transaction refers to a customer, the customer cannot be deleted from the Customer table.

Define a value range. For example, when you enter a salary, it must be between $15,000 and $50,000. You can either specify a maximum value, a minimum value, or a range of values.

 

When any rule is selected, the two bottom panels captions and contents will change based upon the type of rule.

 

For the first panel, the text "Add/Modify Where" will be displayed for rules that apply to added/modified data. If the rule applies to data deletion, the text "Delete Where" will be displayed. The specific rule's condition will appear within the white space.

 

The second panel will either display the text "Succeeds, else display message" or "Fails, else display message" based upon the rule's restriction to succeed or fail to meet the condition.

 

The panels are read only. to make any changes, you must modify the rule.

 

 

Notes:

 

You can turn the RULES setting ON or OFF. The RULES setting must be on for R:BASE to check them.

 

As you use and modify the tables in your database, you might need to revise the data entry rules. For example, if you rename a column or table used in the WHERE clause of a rule definition, you must update the rule to reflect the change.

 

You can delete rules that no longer apply to your database. For example, delete rules that are associated with a column you have deleted from a table.

 

 

See also:

 

RULES

LIST RULES