Calling from other data block into current master/detail form [message #586704] |
Mon, 10 June 2013 03:32 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Lim
Messages: 20 Registered: January 2003
|
Junior Member |
|
|
Hi all,
I got the following scenario.
- A Master/Detail form which is called from previously saved table.
- In the detail form, user is allowed to insert list of data from other block into the current detail form. For that I have one when_button_pressed with the following script define :-
Begin
go_block('ACT_VW_QT_ACTV'); <----- query block
FIRST_RECORD;
IF :BLOCK44.ITEM45 IS NOT NULL THEN
:BLOCK44.ITEM45:=:BLOCK44.ITEM45|| ' OR ';
END IF;
:BLOCK44.ITEM45:=:BLOCK44.ITEM45 || ' (AC_ACTV_CODE = '''|| :ACT_VW_QT_ACTV.TEXT_ITEM140 || ''' ) ';
set_block_property('ACT_VW_QT_ACTV', DEFAULT_WHERE, :block44.item45);
go_block('act_vw_qt_actv');
EXECUTE_QUERY;
GO_BLOCK('ACT_QT_TXN1'); <------ Current Detail block
execute_query;
GO_ITEM('QT_ACTV_CODE');
END;
When this is none, nothing being happened on the current block ( 'ACT_QT_TXN1'), I think it is because of the master/detail link where it always looks back the original link data.
I think this is very common problem but I just can't figure out how to go about it.
I need to based on the search data then to be inserted into current block.
Regards,
Lim
|
|
|
Re: Calling from other data block into current master/detail form [message #586705 is a reply to message #586704] |
Mon, 10 June 2013 03:53 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
SET_BLOCK_PROPERTY modifies block's DEFAULT_WHERE clause (so I'd say that your presumption is wrong).
The question is: is a new WHERE clause correct? Have a look at BLOCK44.ITEM45, copy its value and execute a query similar toselect *
from your_table
where <put BLOCK44.ITEM45 contents here> in SQL*Plus. If it returns something, then it is most probably OK so you'll have to investigate what's going on with your form. If it returns nothing, well, then you'll have to fix the way ITEM45 gets its value.
By the way, you didn't specify which Forms version you use. Is it 10g? If so, run the form in debug mode.
|
|
|