0 Replies Latest reply: Aug 11, 2009 4:32 AM by 647932 RSS

    How to Prevent Duplicate Telephone Numbers

    647932
      Hello

      Is there a way to prevent an employee from capturing duplicate telephone numbers? Right now we have the situation where an employee can capture the same telephone number (011) 666-9999 numerous times. My client would like to prevent that. A telephone number can only be entered once.

      I tried Forms Personalization but get an error when trying to validate my code

      DECLARE
      counter NUMBER := 0 ;
      BEGIN
      IF :system.record_status = 'INSERT' THEN
      SELECT count(*)
      INTO counter
      FROM hr.per_phones
      WHERE phone_type = 'M'
      AND phone_number = :cellno;
      IF counter <> 0 THEN
      bell;
      MESSAGE ('This cell Number already exists. Please enter a Cell Number that does not already exist in the system.');
      RAISE FORM_TRIGGER_FAILURE;
      END IF;
      END IF;
      END;

      Any ideas what I am doing wrong? Or a better way of doing this?

      Regards