Home » Developer & Programmer » Forms » help in record group
help in record group [message #236958] Fri, 11 May 2007 07:32 Go to next message
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
Re: help in record group [message #236962 is a reply to message #236958] Fri, 11 May 2007 07:41 Go to previous messageGo to next message
u263066
Messages: 47
Registered: March 2007
Member
group_name i have already define in package..so it is not missing one here.
Re: help in record group [message #237291 is a reply to message #236962] Mon, 14 May 2007 01:52 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I think the problem is that the group already exists. Search this forum for 'delete_group'.

David
Previous Topic: Record Group In clause
Next Topic: Default button property
Goto Forum:
  


Current Time: Fri Dec 09 03:50:08 CST 2016

Total time taken to generate the page: 0.07466 seconds