Home » Developer & Programmer » Forms » Check on nulls before commit
Check on nulls before commit [message #198429] Tue, 17 October 2006 02:53 Go to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

Hii all

I have a problem in my form

i have a form that are containing mandatory fields "required"
i want to check that those fields are not null
before commit
I don't want to make the item in its property pallete
required is set to yes

because i don't want force the user to enter data immediatly when key on it so that he cannot get out from those fields

So i made this code in the KEY-COMMIT

IF (:CONTACTPERSON IS NULL) THEN
MESSAGE ('REQUIRED FIELDS ARE NULLS');
MESSAGE ('REQUIRED FIELDS ARE NULLS');
RAISE FORM_TRIGGER_FAILURE;
END IF;


THAT CODE RESULTS IS :
THE MESSAGE IS SHOWN SEVERAL TIMES
WHEN EXIT THE FORM IT DOESNOT PREVIEW A CONFIRMATION ASK
OF "CLOSE THE FORM" (YES/NO)



Can anyone help me on this issue


Thanks for everyone helped and helping me
Re: Check on nulls before commit [message #198594 is a reply to message #198429] Tue, 17 October 2006 20:15 Go to previous messageGo to next message
raizen_underground
Messages: 28
Registered: September 2006
Location: Manila, Phillipines
Junior Member
use an alert, it is much better than message...

if :block.item is not null then
commit_form;
else
if show('ALERT') = alert_button1 then
go_block('BLOCK');
end if;
end if;
Re: Check on nulls before commit [message #198814 is a reply to message #198429] Wed, 18 October 2006 11:51 Go to previous messageGo to next message
emadbsb
Messages: 334
Registered: May 2005
Location: egypt
Senior Member

the problem is not in the message or alert
i used alerts instead and still have the problem of redundamcy

and still THE MESSAGE IS SHOWN SEVERAL TIMES
WHEN EXIT THE FORM IT DOESNOT PREVIEW A CONFIRMATION ASK
OF "CLOSE THE FORM" (YES/NO)
Re: Check on nulls before commit [message #198862 is a reply to message #198814] Wed, 18 October 2006 20:55 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Against which item have you placed the 'key-commit' trigger? Do you have more than one of them?

David

[Updated on: Wed, 18 October 2006 20:55]

Report message to a moderator

Re: Check on nulls before commit [message #198884 is a reply to message #198814] Thu, 19 October 2006 00:09 Go to previous message
shahidmughal
Messages: 91
Registered: January 2006
Location: Faisalabad Pakistan
Member

HI

i think you are not showing complete code
because it would happen due to your previous commands
or if you have set item = not null in database

any one cannot tell you approperiate answer until you show the complete code which is running on key-commit trigger.

i hope you will never mind.

regards

Muhammad Shahid Mughal
Previous Topic: Problem in setting Visual Attributes
Next Topic: disabling a button when using tabs
Goto Forum:
  


Current Time: Sat Dec 10 09:23:42 CST 2016

Total time taken to generate the page: 0.09642 seconds