AnsweredAssumed Answered

Custom Error/Alert Message

Question asked by Mathan114 on Oct 30, 2012
Latest reply on Oct 30, 2012 by shalinee
Hi All,

Our Client is asking for a custom alert message when a user enters data more than 5000 chartacers on a text comment field (CLOB).

I wrote a trigger to implement the above requirement.

AFTER UPGRADE OF LAST_UPDATED_DATE
ON CLARITY.ODF_CA_PROJECT
BEGIN

IF(DBMS_LOB.getlength(:new.v_ field)) > 5000
THEN
RAISE_APPLICATION_ERROR(-20010,"Error Message");
END IF;

END;

I wrote trigger on LAST_UPDATED_DATE since I could not write trigger on CLOB field update.

All is well, the error message is thrown when user enters more than 5000 characters, however, the text is not stored.

Is there a way I will allow the application to store the user entered input irrespective of the length of data and then throw an alert message stating, "You have entered more than 5000 characters in Comment field, please consider trimming the comment" ?

Please help.

Regards,
Mathan

Outcomes