Home » Developer & Programmer » Forms » Populate a list (Oracle developer 6I Database oracle express edition 10g)
Populate a list [message #609011] Fri, 28 February 2014 00:33 Go to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
Dear All,

I Have 2 Block A & B

A Block contain Party_code and Party_name
B Block contain Party_Name

i need list item show in block b.item_name so i create a procedure

    PROCEDURE PARTY(p_ListName in number, p_SrcBox in number) IS  
        v_Rg2 RecordGroup;  
    BEGIN  
        v_RG2 := Find_Group('party');  
    END;


And Trigger in when_new_form_instance

    DECLARE  
     v_rg NUMBER;  
     v_GrpID RECORDGROUP;  
    BEGIN  
        v_GrpID := CREATE_GROUP_FROM_QUERY('party', 'SELECT party_name, TO_CHAR(party_name) party_name FROM a ORDER BY 1');  
        v_rg := POPULATE_GROUP(v_GrpID);  
    IF v_rg = 0 THEN  
                POPULATE_LIST('B.party_name', v_GrpID);  
    END IF;
END;


Its working fine
But i want to refresh Block B.party_name when i create new party_name in Block a

Regards

Shahzaib Ismail

[EDITED by LF: removed superfluous empty lines]

[Updated on: Fri, 28 February 2014 00:42] by Moderator

Report message to a moderator

Re: Populate a list [message #609012 is a reply to message #609011] Fri, 28 February 2014 00:44 Go to previous messageGo to next message
Littlefoot
Messages: 21809
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Code you have in WHEN-NEW-FORM-INSTANCE put into a procedure (so that it could be reused). Then call the procedure from the WHEN-NEW-FORM-INSTANCE (so that current functionality remains intact), as well as after creating new PARTY_NAME in block A (so that it gets refreshed).
Re: Populate a list [message #609020 is a reply to message #609012] Fri, 28 February 2014 01:21 Go to previous messageGo to next message
shahzaib_4vip@hotmail.com
Messages: 410
Registered: December 2008
Location: karachi
Senior Member
I Don't understand this Sir

Here is example

i create a table A

 create table a
 (party_code number(10),
 party_name varchar2(50));


And Table B
 create table b 
 (party_code number(10),
 party_name varchar2(50));

Insert into a 
values
(1,'Data');


FMB File Attached




Regards


Shahzaib ismail
  • Attachment: temp.fmb
    (Size: 52.00KB, Downloaded 1083 times)
Re: Populate a list [message #609032 is a reply to message #609020] Fri, 28 February 2014 02:55 Go to previous message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
What precisely in LF's simple instructions do you not understand?
Previous Topic: functionalities of iAS [merged 2 by jd]
Next Topic: problem of refreshing record in a form 10g
Goto Forum:
  


Current Time: Fri May 17 21:30:28 CDT 2024