triggers regarding find_query forms [message #599421] |
Thu, 24 October 2013 08:13 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/95c9b98450e177e0af71a941ba0ac6da?s=64&d=mm&r=g) |
nkumar0130
Messages: 55 Registered: August 2013 Location: Bangalore
|
Member |
|
|
I am working on a form, whose one block is query_find, so on clicking find button it will open another block.
the find block contain 4 column and second block contain around 10 column.
but the column present in find block are associated to standard tables and the column present in block-2 are from custom tables.
there is a query which link those column.
I am not sure where to use that query, so that it will take input from the find block and then populate the result into the block-2.
Any suggestion regarding above is highly appreciated.
Thanks
|
|
|
|
|
|
|
|
|
Re: triggers regarding find_query forms [message #599482 is a reply to message #599480] |
Thu, 24 October 2013 14:42 ![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) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
POST-QUERY? I don't think so; it is OK to use it to populate non-database items after performing query, but to populate the whole multirecord block - no, I wouldn't do it that way.
The second block is based on a single table. Therefore, it fetches data from that table. You need to instruct Forms which data, and you do that by specifying WHERE clause for that block. Block Property Palette contains WHERE property, but it is static. What you need is a dynamic WHERE clause, and it is to be set with SET_BLOCK_PROPERTY and its ONETIME_WHERE.
Basically, you should go to SQL*Plus (or any client you use) and compose a SELECT statement as
select *
from table_from_the_second_block s
-- part that follows should be put into the ONETIME_WHERE
where s.id = (select a.id
from one_table a
where a.first_block_item = :first_block_item
and <no idea, but you said that you know how these tables are to be joined>
)
Once you set it up, simply copy/paste that WHERE clause into a form.
Maybe there's another way, but I think that this is the most appropriate. Wait some time longer; someone else might jump into the discussion.
|
|
|
|
|
|
|
|
|
|