Home » Developer & Programmer » Forms » Query condition in form
Query condition in form [message #613356] Mon, 05 May 2014 08:23 Go to next message
nkumar0130
Messages: 55
Registered: August 2013
Location: Bangalore
Member
Hi,

I have a requirement in form on query part.
The form consist of two block suppose A and B and both the block is based on different table, both the block is having master-child relationship.
I have to add three fields in block A, but those column are not present in block A table but it is present in Block B table.
How to add query condition on these field so that user can get proper record on querying on the basis of newly added fields.
Re: Query condition in form [message #613372 is a reply to message #613356] Tue, 06 May 2014 00:10 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
One option is to omit these 3 items from block A; perform query on existing block A items, then navigate to block B and perform another (sub)query on that result set in order to further refine it by querying on these 3 items (in block B).

Another option might be - if you add these items into block A and they make a relationship - adding additional joins into the relationship (such as "... and block_B.item_1 = block_A.item_1 and ...").

Or, you could set block B's ONETIME_WHERE property (using SET_BLOCK_PROPERTY built-in in block B's PRE-QUERY trigger) which would contain newly added items.

Or, use PRE-QUERY on block B and put something like
if :block_A.item_1 is not null then
   :block_B.item_1 := :block_A.item_1;
end if;


I can't think of any other option at the moment.
Previous Topic: Automatic recompile of procedure body failed
Next Topic: Looping Through Radio Group
Goto Forum:
  


Current Time: Wed Apr 24 00:16:40 CDT 2024