6 Replies Latest reply on Oct 11, 2019 7:34 AM by Paul Susanto

    Conditionally execute AltKey validation in ADF

    Paul Susanto

      Hi,

       

      JDeveloper Version: Studio Edition Version 12.2.1.2.0

       

      Requirement: I want to execute the AltCompositeKey validation in ADF. Basically I have a column named TerminationFlag. Now when the value of the TerminationFlag column is N it should throw the AltCompositeKey validation, and when the TerminationFlag column is Y it should skip the AltCompositeKey validation.

       

      Below is the DB table script.

      CREATE TABLE student_details(

          student_id             NUMBER PRIMARY KEY,

          student_name           VARCHAR2(30),

          student_phone_number   NUMBER,

          student_email          VARCHAR2(30),

          student_dob            DATE,

          student_address        VARCHAR2(200),

          termination_flag       VARCHAR2(1)

      );

       

      Also, the AltCompositeKey is composed of the following column: student_name, student_phone_number, student_email, and student_dob.

       

      As a solution I have create an AltKey as shown below

      1.JPG

      2.JPG

      3.JPG

       

      But irrespective whether the value of TerminationFlag is Y or N it is always executing the AltKey validation.

      4.JPG

      Please suggest how can i bypass the AltKey validation conditionally based on TerminationFlag.

       

      Thanks & Regards,

      Susanto