Home » Developer & Programmer » Forms » How do I change a text_item on a form with a button
How do I change a text_item on a form with a button [message #84996] Wed, 19 May 2004 05:20 Go to next message
Roger Simms
Messages: 14
Registered: May 2004
Junior Member
I Have a text_item (Client_id)that gets populated with a when new form instance trigger

I have created a button on the form and want to change the values in the form to blanks on both items subject_id and client_name

The button fires a trigger with the code below but nothing happens

Can someone explain what I am doing wrong or show me an example of how to do this

Thanks

Trigger on form
begin

DEFAULT_VALUE('','global.subject_id');
IF NAME_IN('global.subject_id') IS NOT NULL THEN
:EMPTY.SUBJECT_ID := NULL;
:EMPTY.CLIENT_NAME := NULL;
END IF;

end;
Re: How do I change a text_item on a form with a button [message #85006 is a reply to message #84996] Thu, 20 May 2004 22:12 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Can't see anything wrong in a glance, but here's a tip:
when you don't get what you want from your code, start displaying messages:
message('step 1');pause;
DEFAULT_VALUE('','global.subject_id');
message('Subject_id: '||:global.subject_id);pause;
IF NAME_IN('global.subject_id') IS NOT NULL THEN
:EMPTY.SUBJECT_ID := NULL;
:EMPTY.CLIENT_NAME := NULL;
END IF;

Now you know 2 things: If 'step 1' is never displayed, you know this code is never reached; from the second message you know the contents of your global.

From there, work your way down to the actual problem.

hth,
Frank
Previous Topic: for oracle developer book with project work
Next Topic: Pleas esend me a free 8i tutorial
Goto Forum:
  


Current Time: Mon Jul 08 16:07:56 CDT 2024