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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle forms - opening a new form with data

Status
Not open for further replies.

upthorpe

Programmer
Dec 23, 2002
7
GB
I have two V6 oracle forms which display data from tables. On a mouseclick on form 1, I have created a trigger to store two key fields in global variables and open form 2.

I have created a trigger in the second form to display these key values, but what I really would like to do is to use them as a database key to interrogate the database and display all relevant fields on the second form - without the need to explicitly execute a query.

I have created some PL-SQL in the trigger which does a select based on the key fields and moves the retrieved data to the form, but this is a very long-winded exercise - is there a way to do this automatically, perhaps using key relationships between the two forms.

Any assistance or advice gratefully received.
 
Hi,

Why not use parameters to pass values between Forms? "They" always say it's better to use parameters than global-variables.
You can then use the parameters in the 2nd Form to restrict the queying records from the database. Or use them as default values when inserting/updating.


Alux
 
There's no "embedded" cross-forms relationships, but you may pass the third parameter STARTUP_MODE = 'QUERY' to the called form and execute an appropriate query (possibly set default_where, or even base your original query on those 2 parameters) from w-n-f-i trigger, if the value passed is 'QUERY'. Otherwise - do nothing. Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top