Home » Developer & Programmer » Forms » Multiple Data Blocks
Multiple Data Blocks [message #82768] Wed, 02 July 2003 06:21 Go to next message
Messages: 80
Registered: September 2001
I have two data blocks on my form. The Master block is based on a view of a table A and the Detail block is based on table A.
Now my problem is when I press a button Fetch Records, I want to populate the Detail block items with the records of another table B. So when I have it on this detail form, I could automatically save it on my Table A.

Please help
Re: Multiple Data Blocks [message #82782 is a reply to message #82768] Thu, 03 July 2003 06:23 Go to previous messageGo to next message
Messages: 324
Registered: January 2003
Senior Member
block A1 [[view A]]
block B [[table B]]
block A2 [[remove this block of table A]]

make a relation between A1 and B
query the A1.
The B is also queried.
after the query is finished use a button to
insert the rows of the B block into table A
when-button-pressd trigger contains:
first record;
v_first number:=:system.cursor_record;
v_last number:= :system.cursor_record;
while not :system_cursor_record=v_last loop
insert into table A
v_field1:=''; -- reset the values of the variables

down;-- takes the next row
end loop;
[[remember this way the last record is not processed.. so after the loop, you should use the same way just for the last record.]]
Re: Multiple Data Blocks [message #82793 is a reply to message #82782] Sat, 05 July 2003 06:02 Go to previous message
Messages: 80
Registered: September 2001
Hi magnetic,
Thx for the reply. But my problem is this.
I agree with the answer given. But how could one get the value of an item which on a different canvas.
Better still, how could one get the values of a tabular records on one canvas onto the items of a different canvas.
We have two canvases each attached to a block resp., viz. A and B
Then when we are updating B which is a tabular canvas, we want the items' valuesof this canvas to automatically appear on the B, when we press a button or whatever.
I could do this for a single item on canvas B using
But I could do this for all the items present on canvas B
Previous Topic: Deleting Records from Form...
Next Topic: Controlling child forms
Goto Forum:

Current Time: Sat Mar 02 20:00:39 CST 2024