help in record group [message #236958] |
Fri, 11 May 2007 07:32 |
u263066
Messages: 47 Registered: March 2007
|
Member |
|
|
I have written a code to built a record group under with 2 condition to proceed further:
1.User pressed pressed a button and checked all checkbox instalnly and submit
2.User check some of the checkbox from multirecord data and then submit
The case 2 is working fine but case 1 is somehow not able to bulit the group.
can anyone advice
Checked value is Y
Unchecked is N
procedure create_populate_rec_group(p_tpp_trans_id in number) is
rec_grp_id RecordGroup;
grp_col_id GroupColumn;
begin
rec_grp_id := FIND_GROUP(group_name);
grp_col_id := FIND_COLUMN(group_name||'.'||coll_name);
if ID_NULL(FIND_GROUP(group_name)) then --C
rec_grp_id := CREATE_GROUP(group_name,FORM_SCOPE,20);
grp_col_id := ADD_GROUP_COLUMN(rec_grp_id,coll_name,NUMBER_COLUMN);
end if; --C
if :INVOICE_HEADER.REPROCESS_CHECKBOX = 'Y' then --B
ADD_GROUP_ROW(rec_grp_id,END_OF_GROUP);
SET_GROUP_NUMBER_CELL(grp_col_id,GET_GROUP_ROW_COUNT(rec_grp_id),p_tpp_trans_id);
elsif :INVOICE_HEADER.REPROCESS_CHECKBOX = 'N' then --B
for i in 1..GET_GROUP_ROW_COUNT(rec_grp_id) loop --A
if p_tpp_trans_id = GET_GROUP_NUMBER_CELL(grp_col_id ,i) then --A1
DELETE_GROUP_ROW(rec_grp_id,i);
-- ifc_debug_proc('delete row '||i);
exit;
end if; --A1
end loop; --A
end if; --B
end create_populate_rec_group;
My guess C part is somehow troubling.
any advice
|
|
|
|
|