Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

have form open with specific record displayed

Status
Not open for further replies.

bookouri

IS-IT--Management
Feb 23, 2000
1,464
US
I have an oracle developer form 4.5 form... I want to query an employee record and have it on the form.. I then want to be able to open another form, say employee phone numbers and have the form automatically retrieve the same employee. How can I "link" two forms to have the same record displayed without having to re-query to pull up the same person on form number two...???

thanks for any help...
 
In the calling form:
DECLARE
pl_id PARAMLIST;
BEGIN
pl_id := get_parameter_list('temp');
IF NOT ID_NULL(pl_id) THEN
destroy_parameter_list(pl_id);
END IF;
pl_id := create_parameter_list('temp');
IF ID_NULL(pl_id) THEN
message('Opps!');
RAISE FORM_TRIGGER_FAILURE;
END IF;
add_parameter(pl_id, 'EMP_ID', TEXT_PARAMETER, :block.field);
open_form('form name', ACTIVE, NO_SESSION, no_share_library_data, pl_id);
go_form('form name');
IF NOT form_success THEN
message('Opps!');
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;

In the called form create a parameter with the same name as above 'EMP_ID' in this case.
In the when-new-form-instance trigger write something like this:

BEGIN
IF :parameter.emp_id IS NOT NULL THEN
set_block_property('block name', DEFAULT_WHERE, 'emp_id = to_number:)parameter.emp_id)');
END;

Hope you get the picture, else search for parameters in the Oracle forms builder help.
 
thanks, Ill give that a try and see what happens.
 
dear friends ....
ppls tell me the name of oracle9i-SQL book for OCP...
and the author
thanks in advance
meenakshi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top