Tuesday, 28 April 2015

APEX 5.0 - PL/SQL Function Returning Error Text - Bug 20971572

I prefer using PL/SQL Function Returning Error Text while creating validations. Two days ago I discovered a bug - it is not possible to create the function if no error message entered. This bug has been documented and will probably be fixed in 5.1. The workaround is to enter a dummy text like "ERROR" or similar.

3 comments:

  1. Yes , in apex 4.2.4 Error message was allowed to be empty

    ReplyDelete
  2. I would say you should't use variable for error text:

    BEGIN
    IF :job='CLERK' and :sal > 3000
    THEN
    RETURN 'Salary may not exceed 3000 for the job CLERK.';
    END IF
    END;

    but if you want to use variable then you should check it is it empty or null before return:

    IF LENGTH(v_error)>0
    THEN
    RETURN v_error;
    END IF;

    ReplyDelete
  3. I would say you should use a name instad of "Anonymous" :) and I would also say "think twice before posting something". ;)

    Denes Kubicek

    ReplyDelete