Tuesday 25 September 2012

Adding Sql Validation

    In this topic, you add a validation to your tabular form that checks to make sure that a manager is only assigned to one department.
    Under Page Processing, right-click Validating > Validations and select Create.
    Select Tabular Form from the list of Tabular Forms, select the Column validation level and click Next.
    Select the MANAGER_ID column and click Next.
    Enter Manager only assigned to one department for Validation Name and click Next.
    Select SQL for validation type and click Next.
    Select NOT Exists for type of validation and click Next.
    Enter select manager_id from departments for Validation Code, enter something in the Error Message field, select Yes to Always Execute and click Create Validation.
    Your validation was created. Click Run.
    Change the Manager for one of the departments so that it has the same name as another department and click Submit. Notice that Higgins is also the manager for another department so you should get an error.
    The error is displayed. Note the error message includes a clickable link to the corresponding row with the error.

No comments:

Post a Comment