Question

I have created an LOV to populate a text field. The text field's property "Validate using LOV" is set to the aforementioned LOV. This means user cannot enter any values other than the ones in LOV.

When the user enters a value not in LOV, oracle displays an error message by default which includes the programmatic name used for the text field. Something like,

Not a valid value for TXT_CUST_NAME

Is there a way to customize this error message in forms to be user friendly?

Was it helpful?

Solution

You can use the On-Error trigger in oracle forms to override the default functionality. To be able to do taht your first need to check what is the FRM error id of the error message. Then you can write something like this:

IF error_code = <error id> THEN 
   Message('Your Custom Error Message');

END IF;

RAISE FORM_TRIGGER_FAILURE;

It is important that you remember the raise form_trigger_failure because otherwise the program flow will continue as the error never have happened. This can of course be used for suppressing unwanted error messages but that is another story.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top