Home » Developer & Programmer » Forms » Oracle Form Block populate from another block
Oracle Form Block populate from another block [message #601384] Wed, 20 November 2013 06:54 Go to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
I have one block which has 5 record. i want when i am going save it this data of this block will copy to another block which is also database block
....how i can do this ...i cursor then how??paste sample code
Re: Oracle Form Block populate from another block [message #601392 is a reply to message #601384] Wed, 20 November 2013 08:39 Go to previous messageGo to next message
joy_division
Messages: 4963
Registered: February 2005
Location: East Coast USA
Senior Member
Not enough info for me. I cannot picture anything from this description.
Re: Oracle Form Block populate from another block [message #601394 is a reply to message #601392] Wed, 20 November 2013 08:48 Go to previous messageGo to next message
irfankundi786@yahoo.com
Messages: 269
Registered: February 2009
Location: pakistan
Senior Member
how i can populate the data from one block to another block......i have two block ,in one block data is availbe and in another block want to copy data from thats block
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 messageGo to next message
cookiemonster
Messages: 13923
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 messageGo to next message
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'


Re: Oracle Form Block populate from another block [message #601405 is a reply to message #601402] Wed, 20 November 2013 09:47 Go to previous message
cookiemonster
Messages: 13923
Registered: September 2008
Location: Rainy Manchester
Senior Member
You see those questions on the end of my last post?
Answer them.
Previous Topic: How to remove tile -[WIN_MAIN] at runtime
Next Topic: Calendar Object [merged 2 by jd]
Goto Forum:
  


Current Time: Fri May 17 01:16:14 CDT 2024