'how to promt a message if a field is empty in oracle forms
How to prompt a message if field is empty in oracle forms i'm not sure if it works and the trigger i'm using is when-validate-item
begin
if date = NULL then
message('please enter issue date')
else
null;
end if;
end;
Solution 1:[1]
From my point of view:
you should edit field's properties and set the required property to yes and let Forms worry about it
if you insist on reinventing the wheel, then don't just display a message as it is pretty much useless - user can ignore it. Raise an error, instead
if :block_name.item_name is null then message('Please, enter issue date'); raise_form_trigger_failure; end if;Put that piece of code into the
WHEN-VALIDATE-ITEMtrigger.
Solution 2:[2]
Just modify the code a little bit as
converting
date = NULLto:date IS NULL, since:prepended to the field's name within the codeadd an extra
message('');(exactly this with blank padded argument) if a pop-up message box neededdon't forget the semicolon at the end of the line of the current
message(....)
as invoking from one of the WHEN-VALIDATE-ITEM or WHEN-NEW-ITEM-INSTANCE triggers
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Littlefoot |
| Solution 2 | Barbaros Özhan |
