|
|
|
Re: Oracle Form Block populate from another block [message #601398 is a reply to message #601394] |
Wed, 20 November 2013 09:14 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13937 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
The way you normally set block items programatically:
:block2.item1 := :block1.item1;
:block2.item2 := :block1.item2;
:block3.item2 := :block1.item3;
.....
etc
You may or may not have loop over that using first_record/next_record depending on the blocks and which trigger you use to run the code. I couldn't really say because, like Joy Division, I'm really not sure what you are trying to achieve.
Why does the 2nd block exist?
Is it always empty when the form opens?
Do you ever populate it when you query data in the first block.
Do you modify the 2nd block on insert/update/delete of the first block?
Is the 2nd block multi-record?
[Updated on: Wed, 20 November 2013 09:15] Report message to a moderator
|
|
|
Re: Oracle Form Block populate from another block [message #601402 is a reply to message #601398] |
Wed, 20 November 2013 09:39 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
irfankundi786@yahoo.com
Messages: 269 Registered: February 2009 Location: pakistan
|
Senior Member |
|
|
:block2.item1 := :block1.item1;
:block2.item2 := :block1.item2;
:block3.item2 := :block1.item3;
.....
but at time of save the another block is populated and it also database block that will be insert in database and multi record block.
i think this will be done through loop but how??
go_block('first_block');
first_record;
loop
-------------what code is needed here
exit when :system.last_record='TRUE'
next_record;
end loop'
|
|
|
|