Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

POST-TEXT-ITEM / WHEN-VALIDATE-ITEM - checking for NULL

401644Dec 14 2005 — edited Dec 15 2005
Hi.

I need to disallow null values for certain fields. I discovered that when-validate-item does not fire when nothing is entered.

I can't use the required property as this is a new demand, and historical data is often referenced.

The form is about passengers, and certain data about them should now be required.

So I went for a POST-TEXT-ITEM and a trigger failure. That seemed to work fine, until somebody tried to enter the names, and use the mouse to navigate to the next record. This way you'll end up with a few illegal records. You'll be stopped when trying to exit. It navigates to the first offending item, and issues an alert.

Now, when entering a correct value, and mouse-navigating to record 2 (clicking in the field to enter a value there as well) the message appears on what I interpret as moving/navigating INTO the field, which does not make any sense to me. If you have 30 passengers without the required fields you'll get 29 "erroneous error messages".

What's going on?
Should I pursue another strategy to solve this?


Pseudo code for POST-TEXT-ITEM:

IF :b2.last_name IS NOT NULL AND :b2.sex IS NULL AND :b2.date > some_date
THEN
show_message('bad user!');
RAISE FORM_TRIGGER_FAILURE;
END IF;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2006
Added on Dec 14 2005
4 comments
1,251 views