Home » Developer & Programmer » Forms » Clear the Block If Value Change (Oracle 9i, Form 6i)
Clear the Block If Value Change [message #537428] Wed, 28 December 2011 05:29 Go to next message
cvs_1984
Messages: 136
Registered: August 2007
Location: Punjab, INDIA
Senior Member

Hi,

I Require to Fetch the Group of Value in Item Block Selected
through the User Selected LOV Value in Master.

Through Loop i Fetch the Records in Item Block.

When User Change the Selected LOV Value Require to
Clear the Item Block.

BEGIN

 FOR NRM IN (SELECT MTRLTYPE,STATUS,
 MTRL_NO,MTRL_ID FROM JAWOADMIN)

LOOP

 GO_BLOCK('NRMTRL_ITEM');

   :NRMTRL_ITEM.NRMTRL_TYPE   := NRM.MTRLTYPE;
   :NRMTRL_ITEM.REMARKS       := NRM.STATUS;
   :NRMTRL_ITEM.NRMTRLREF_NO  := NRM.MTRL_NO;
   :NRMTRL_ITEM.NRMTRLREF_ID  := NRM.MTRL_ID;

 NEXT_RECORD;
  
END LOOP;
END;


Kindly Guidance me. How to Clear the Block before the above loop.

Regards,

C V S
Re: Clear the Block If Value Change [message #537433 is a reply to message #537428] Wed, 28 December 2011 05:48 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
GO_BLOCK you used should be outside the loop. It navigates to the block's first record, so you just keep overwriting the first record's items. Something like this:
go_block('nrmtrl_item');
clear_block;

for ... loop
  :nrmtrl_item.nrmtrl_type := nrm.mtrltype;
  ...
end loop;

Previous Topic: Query
Next Topic: how to enter Arabic Language in Particular field in oracle form6i
Goto Forum:
  


Current Time: Mon Jul 15 15:11:37 CDT 2024