Problem with Enter Query and Execute Query forms 6i [message #319520] |
Mon, 12 May 2008 01:34  |
rahul15june
Messages: 35 Registered: May 2008
|
Member |
|
|
Hi,
I have a content canvas which has a Database block. and a stacked canvas which has a "non" database bock. Now the stacked canvas has a date field along with the check box. (Its multirecord). So when user selects the checkbox then the stacked canvas is hidden and the content canvas database block is made enter query and which ever date value was there in the stacked canvas that is used as a parameter in the content canvas and I want to execute the query programatically.
However, After Enter query, nothing happens in the form and I have to manually enter the value in the form and hit F8 rather than it happening programatically. Here is my code in the stacked canvas when-checkbox-changed trigger.
IF :CB_VIEW = 1 THEN
HIDE_VIEW('DAYSTATS'); -- this is the stacked canvas
GO_BLOCK('EXP_MAIN'); -- This is the database block
CLEAR_BLOCK(NO_VALIDATE);
ENTER_QUERY;
:EXP_MAIN.EXP_DATE := :DAYSTATS.DAYDATE; --Here I am assigning the database block date field with the stacked canvs date value
EXECUTE_QUERY; -- I want to execute the block with the date selected.
:CB_VIEW := 0;
END IF;
All of this should happen automatically without users having to hit F7 or F8 button.
Thanks in advance,
Rahul
|
|
|
Re: Problem with Enter Query and Execute Query forms 6i [message #319553 is a reply to message #319520] |
Mon, 12 May 2008 03:12   |
 |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
ENTER_QUERY;
:EXP_MAIN.EXP_DATE := :DAYSTATS.DAYDATE; --Here I am assigning the database block date
--field with the stacked canvs date value
EXECUTE_QUERY; -- I want to execute the block with the date selected. This can't work because once you enter ENTER_QUERY mode, Forms waits for a search criteria (if any) and EXECUTE_QUERY.
What you could do is to set the DEFAULT_WHERE property (using the SET_BLOCK_PROPERTY built-in) and execute a query. Something like
SET_BLOCK_PROPERTY('exp_main', DEFAULT_WHERE, 'exp_date = ' || :daystats.daydate);
EXECUTE_QUERY;
[Updated on: Mon, 12 May 2008 21:21] by Moderator Report message to a moderator
|
|
|
|
|