Home » Developer & Programmer » Forms » FORM DATA
FORM DATA [message #640666] Mon, 03 August 2015 03:47 Go to next message
benphilsyahoocom
Messages: 13
Registered: May 2011
Location: NIGERIA
Junior Member
I created an Oracle form with 2 data blocks running on a single Canvas Field, The first block contains 5 Columns A,B,C,D,E arranged in vertical section containing data of block A(the first block)while the second block in the same canvas contains data A,B,C,D,C arranged in tabular form. i want a situation whereby when i click on the button (addcart) in the first block the exact information will be migrated to the second block and can be viewed on execution/clicking of the add cart.Below is the image of the form.Thanks
Re: FORM DATA [message #640667 is a reply to message #640666] Mon, 03 August 2015 04:27 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It would be simpler if you had only one block - the second one showed on the screenshot, organized in a tabular way. It would require just one item to be added (ITEMDETAILS). Because, you'd as easily add a new item into a tabular form and avoid problems you have now.

Anyway: if you want a newly added item to be displayed in the second block, you'll have to "refresh" (requery) that block. It means that you'll have to modify ADDCART button's WHEN-BUTTON-PRESSED trigger and add several lines; something like
-- your current code is here
...

-- now, newly added code:
go_block('item_order_list');
execute_query;
go_block('the_block_on_the_left_side_of_the_screen');
Re: FORM DATA [message #640683 is a reply to message #640667] Mon, 03 August 2015 11:38 Go to previous messageGo to next message
xebec
Messages: 37
Registered: July 2014
Location: Miraflores
Member
I agree with Littlefoot.

If you are working with one datablock , it will be easy.
Because in one part it is a maintance (insert) and un the second part it will be a query ...
WHEN-NEW-BLOCK-INSTANCE or WHEN-NEW-FORM-INSTANCE.

Good luck! Very Happy
Re: FORM DATA [message #641149 is a reply to message #640667] Tue, 11 August 2015 04:09 Go to previous messageGo to next message
benphilsyahoocom
Messages: 13
Registered: May 2011
Location: NIGERIA
Junior Member
Hi, Please how do i save records from one block containing records in tabular rows in oracle forms into a different table(i.e from Block A into Table B in oracle data base) and i do not want the records to be saved in the table containing block A. Thanks
Re: FORM DATA [message #641169 is a reply to message #641149] Tue, 11 August 2015 07:57 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That smells like a wrong design. If you want Forms to save tabular block's records into some table, then base that block on exactly that table. That's how it is supposed to work.

If, for some reason (by the way, what is your reason?) you don't want to do that, you'll have to create your own INSERT procedure. That tabular block should be a control block (i.e. not based on a table), you'll have to loop through all records in a block and insert them into the target table.

In my opinion, too much job for something that Forms does easily, without you having to write a single line of code.
Re: FORM DATA [message #641309 is a reply to message #641169] Thu, 13 August 2015 03:51 Go to previous message
benphilsyahoocom
Messages: 13
Registered: May 2011
Location: NIGERIA
Junior Member
Thanks littlefoot, i have been able to find a work around on this issue, what i did was to base the block separately on each block where the data was to be fetched ans inserted to and it worked.Thanks a lot.
Previous Topic: Linking Forms based on criteria
Next Topic: Detail block
Goto Forum:
  


Current Time: Thu Mar 28 05:17:53 CDT 2024