Home » Developer & Programmer » Forms » needed reply immediately
needed reply immediately [message #305862] Wed, 12 March 2008 04:20 Go to next message
vinaya.v
Messages: 8
Registered: March 2008
Junior Member
how to assign the record group created to a particular list item during run time
with regards
divya
Re: needed reply immediately [message #305869 is a reply to message #305862] Wed, 12 March 2008 04:48 Go to previous messageGo to next message
MarcS
Messages: 312
Registered: March 2007
Location: Antwerp
Senior Member
Damn, almost forgot to reply immediately Smile

Sorry, don't know the answer to your question.

EDIT: An assignment in PL/SQL looks like

 left := right ;


If the record group is of the same type as the items in your list, then you can use the assignment as is.
If not, then you'll have to assign the different attributes/members of the group.

HTH
Marc

[Updated on: Wed, 12 March 2008 04:52]

Report message to a moderator

Re: needed reply immediately [message #305874 is a reply to message #305862] Wed, 12 March 2008 05:12 Go to previous messageGo to next message
D_ashish
Messages: 20
Registered: November 2007
Location: india
Junior Member
As per my limited knowledge ....i hav implemented prob. in which LOV has to popup depending upon another LOV'S select Value. for this just select pass value selected by first LOV in the query of where clause (:BLOCK_NAME.LIST1)

Thanks
Ashish D
Re: needed reply immediately [message #305914 is a reply to message #305862] Wed, 12 March 2008 05:59 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
/*
CREATE_GROUP_FROM_QUERY
Example: Create a record group from a query, and populate it.
*/
DECLARE
rg_name VARCHAR2(40) := 'Salary_Range';
rg_id RecordGroup;
errcode NUMBER;

BEGIN

/*** Make sure group doesn't already exist */
rg_id := Find_Group( rg_name );

/*** If it does not exist, create it and add the two ** necessary columns to it.*/

IF Id_Null(rg_id) THEN
rg_id := Create_Group_From_Query( rg_name, 'SELECT ename, ename FROM EMP ORDER BY 1');
ELSIF NOT Id_Null (rg_id) THEN
Delete_Group (rg_id);
rg_id := Create_Group_From_Query( rg_name, 'SELECT ename, ename FROM EMP ORDER BY 1');
END IF;

/*
** Populate the record group. Populate_Group return zero if population is successful
else return a ora error coressponding to the query failure
*/

errcode := Populate_Group( rg_id );






POPULATE_LIST ('LI1', rg_id);



END;
Re: needed reply immediately [message #305943 is a reply to message #305914] Wed, 12 March 2008 06:36 Go to previous messageGo to next message
Flash
Messages: 34
Registered: February 2008
Member
My code

DECLARE

group_id RecordGroup;
emp_id Item := Find_Item('employee');
status NUMBER;

BEGIN

IF ID_NULL (group_id) THEN
message('null');
else
messagE('not null');
end if;

clear_list (emp_id);
group_id := Create_Group_From_Query('employee_list','SELECT ename, ename FROM emp WHERE deptno = '||:dept);
status := Populate_Group('employee_list');

Populate_List(emp_id,group_id);

END;

Thanks
Flash
Re: needed reply immediately [message #305985 is a reply to message #305862] Wed, 12 March 2008 08:33 Go to previous message
karunakar_adepu84
Messages: 43
Registered: January 2008
Member
Hi Friend,

how to assign the record group created to a particular list item during run time
try this ok

1) create one record group with a query like

create_group_from_query('rgname','select to_char(empno)
emp_no,to_char(empno) emp_no_a from emp');
this will create a record group for U.
NOTE: 1) IF U want to attach RG to list item there the selected
column s must be in varchar2 type.
2) There at most two columns only, one for label and second
one is for value.


2) Now populate this group with rgname

populate_group('rgname');

3) Now populate this rg in list item where U want

populate_list('blockname.listitemname','rgname');

4) at last delete the rg with
delete_group('rgname');

The whole code is
triggers :when-new-form-instance
code:

declare
RGID recordgroup;
N number;
begin
rgid:=create_group_from_query('empnorg','select
to_char(empno) emp_no ,to_char(empno) empnos from
emp);
n:=populate_group('empnorg');
populate_group('emp.empno');
--delete_group('empnorg');
end;


Previous Topic: please explain this procedure
Next Topic: Short cut keys to access menu items
Goto Forum:
  


Current Time: Sat Feb 08 20:55:21 CST 2025