Home » Developer & Programmer » Forms » MASTER-DETAIL FORM
MASTER-DETAIL FORM [message #545977] Sun, 04 March 2012 04:36 Go to next message
divyasathish86
Messages: 3
Registered: March 2012
Junior Member
MASTER-DETAIL FORM HAVING AN LOV IN THE MASTER .LOV SELECTS THE PRIMARY KEY FIELD FROM
THE MASTER TABLE AND IN LOV PUSHBUTTON HAVING A TRIGGER WHEN BUTTON PREESED

Declare
bool boolean;
begin

bool := show_LOV('PURCHASELOV');
if :PURCHASEITEMHD.PURCHASEITEMHDID IS NOT NULL THEN
go_block('PURCHASEITEMTL');
EXECUTE_QUERY(NO_VALIDATE);
LAST_RECORD;
END IF;
end;

WHEN SELECTING THE ITEM THROUGH LOV IT EXECUTES ALL VALUES BUT AFTER CHANGING ANY DATAS THEN NEW RECORD IS CREATED
IN THE MASTER TABLE AND NO CHANGES OCCURED TO THE CHANGED RECORD.

ANYONE PLS HELP ME....
Re: MASTER-DETAIL FORM [message #546009 is a reply to message #545977] Sun, 04 March 2012 10:15 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That's because you did it wrong.

You didn't "change" any (master) record, you entered a brand new one.

This is how it is supposed to work: while in master block, enter query mode. Enter search criteria (there's no problem in selecting it from a list of values you already have, just REMOVE the whole "IF" clause from the trigger). Execute query.

Both master record and its detail records will appear. Now you can change these values, delete them or insert new ones.

That's it.

What you did was: you didn't enter query mode. You selected values from list of values into a master block (which - as far as Forms is concerned - you entered a new record. You didn't fetch the one from the database). EXECUTE_QUERY fetched details because of relationship that exists between master and detail block.
Re: MASTER-DETAIL FORM [message #546016 is a reply to message #546009] Sun, 04 March 2012 10:27 Go to previous messageGo to next message
divyasathish86
Messages: 3
Registered: March 2012
Junior Member
thanks a lot for your reply ....
am not using the default menu toolbar can u pls tell me how can i include enter query mode in when button press trigger
Re: MASTER-DETAIL FORM [message #546018 is a reply to message #546016] Sun, 04 March 2012 10:40 Go to previous messageGo to next message
cookiemonster
Messages: 13925
Registered: September 2008
Location: Rainy Manchester
Senior Member
The built-in enter-query puts the form in enter query mode.
Maybe you should spend some time reading the forms documentation.
Re: MASTER-DETAIL FORM [message #546080 is a reply to message #546018] Mon, 05 March 2012 04:34 Go to previous message
divyasathish86
Messages: 3
Registered: March 2012
Junior Member
thanks.. i got it
Previous Topic: Load Images from Client PC to Form
Next Topic: how can i send sms and mail through form 6i [merged 2 by JD]
Goto Forum:
  


Current Time: Sat Jul 06 00:11:53 CDT 2024