rcmuthu786
rcmuthu786

Reputation: 130

Issues on wrong date format in oracle forms

If I give wrong date in one block field it should not allowed to enter other block in oracle forms.

eg:- in date field I'm entering values like MUHUTHUTHU after that I'm moving cursor to next block. first time I'm getting an error mesage FRM-50026 (wrong date format) but the cursor moved to other block.

But I don't want to allow to another block. Thanks to help me out from this issue.

Upvotes: 0

Views: 2668

Answers (2)

Peter Å
Peter Å

Reputation: 1319

The default functionality if the entered data is not valid according to the format mask is that the focus stays in the item. It is though possible to accidently or not override the default functionality. You can e.g. use On-Error trigger to override the default error handling and of you forget to call RAISE FORM_TRIGGER_FAILURE after your custom error handling then the program flow will continue as no error have happen at all.

Upvotes: 1

pablomatico
pablomatico

Reputation: 2242

If you specify the format mask property of that item as a valid date format (MM/DD/RRRR for example), Forms should take care of it by itself.

If not, you need to check the date format in the WHEN-VALIDATE-ITEM trigger and if it's not a valid date then raise the FORM_TRIGGER_FAILURE exception:

RAISE FORM_TRIGGER_FAILURE;

That will keep the cursor in that field.

Upvotes: 1

Related Questions