This content has been marked as final. Show 9 replies
Try to put your statement in a post-query trigger.
Hope it helps you,
You can't use go_item in post-query trigger.
Are you sure?
I have seen the online help and there is nothing about it..
Here is the online help.
Post-Query Trigger Description
When a query is open in the block, the Post-Query trigger fires each time Oracle Forms fetches a record into a block. The trigger fires once for each record placed on the block's list of records.
Definition Level form or block Legal Commands SELECT statements, unrestricted built-ins Enter Query Mode no
Usage Notes Use a Post-Query trigger to perform the following tasks: populate control items or items in other blocks calculate statistics about the records retrieved by a query calculate a running total When you use a Post-Query trigger to SELECT non-base table values into control items, Oracle Forms marks each record as CHANGED, and so fires the When-Validate-Item trigger by default. You can avoid the execution of the When-Validate-Item trigger by explicitly setting the Status property of each record to QUERY in the Post-Query trigger. To set record status programmatically, use SET_RECORD_PROPERTY . On Failure Oracle Forms flushes the record from the block and attempts to fetch the next record from the database. If there are no other records in the database, Oracle Forms closes the query and waits for the next operator action. Fires In Fetch Records Post-Query Trigger Examples Example This example retrieves descriptions for code fields, for display in non-database items in the current block. DECLARE CURSOR lookup_payplan IS SELECT Payplan_Desc FROM Payplan WHERE Payplan_Id = :Employee.Payplan_Id; CURSOR lookup_area IS SELECT Area_Name FROM Zip_Code WHERE Zip = :Employee.Zip; BEGIN /* ** Lookup the Payment Plan Description given the ** Payplan_Id in the Employee Record just fetched. ** Use Explicit Cursor for highest efficiency. */ OPEN lookup_payplan; FETCH lookup_payplan INTO :Employee.Payplan_Desc_Nondb; CLOSE lookup_payplan; /* ** Lookup Area Descript given the Zipcode in ** the Employee Record just fetched. Use Explicit ** Cursor for highest efficiency. */ OPEN lookup_area; FETCH lookup_area INTO :Employee.Area_Desc_Nondb; CLOSE lookup_area; END
You can't use the commads "go_block", "go_item", etc, in the triggers "post-query", "when_validate_item", "post_change"....
You have done the correct thing. GO_ITEM does work in KEY-EXEQRY. You dont need a timer to get it to work
so in KEY-EXEQRY you can have
Are you sure the trigger is firing and the code is executing ? Use the debugger or add MESSAGE calls to confirm that it is firing. Maybe you have a block level trigger that is overriding the form level trigger or vice versa
Also - post the trigger code here
Legal Commands SELECT statements, unrestricted built-insGo_Item is a restricted built-in.
The go_item could be failing for whatever reason. Try adding an
IF NOT form_success THEN
after the go_item and see if you get a dialog box up.
Is seems as the go_item would fire sooner than detail block is filled with data.
Cursor jumps to detail block before detail block data is queried.
Why is that happening?
Message was edited by:
Message was edited by: