You do not want users to execute queries while in the Order_Items block, so you write the
following key-Exeqry trigger for the Order_Items block:
GO_BLOCK(‘orders’);
EXECUTE_QUERY;
This works fine except that in the Order_Items block, when you click Enter Query first, and then
click Execute Query, you get the error message “FRM-41009: Function key not allowed.” What
can you do correct this?
A.
Set the FireinEnter-Query Mode property of the Key-Exeqry trigger to Yes.
B.
Add the following as the first of the key-Exqry trigger to Yes.
SYSTEM.mode :=’NORMAL’;
C.
Delete the Key-Exqry trigger and define the following Key-Entqry trigger for the Order_Items
block:
GO_BLOCK (‘orders’);
ENTER_QUERY;
D.
Delete the Key-Exqry trigger and define the following Key-Entqry trigger for the Order_Items
block:
ENTER_QUERY;
GO_BLOCK (‘orders’);
E.
Change the key-Exqry trigger to:
IF : SYSTEM.MODE :=’ENTER-QUERY’THEN
GO_BLOCK (‘orders’);
EXECUTE_QUERY;
ELSE
MESSAGE (‘you cannot execute a query for the Order_Items block’):
END IF;
Define the following Key-Entqry trigger for the Order_Items block:
GO_BLOCK (‘orders’);
ENTER_QUERY
F.
Change the Key-Exeqry trigger to:
IF :SYSTEM.MODE !=’ENTER-QUERY’THEN
GO_BLOCK(‘orders’);
EXECUTE_QUERY;
ELSE
MESSAGE (‘You cannot execute a queryinthis block’);
ENTER_QUERY;
GO_BLOCK (‘orders’);
G.
You cannot change this behavior, but you should use the On-Message trigger to display a more
meaningful message.
Explanation:
Note: You can use system variables and built-ins to obtain information about queries.
UsingSYSTEM.mode
Use theSYSTEM.modesystem variable to obtain the form mode. The three values are
NORMAL,ENTER_QUERY, andQUERY.
NORMAL Indicates that the form is currently in normal processing mode. ENTER-QUERY
Indicates that the form is currently in Enter Query mode. QUERY Indicates that the form is
currently in fetch processing mode, meaning that a query is currently being processed.
Note 1: ENTER_QUERY procedure
Clears the current block and creates a sample record.Operators can then specify query
conditionsbefore executing the query with a menu or button command.If there are changes to
commit, the Forms Builderprompts the operator to commit them before continuingENTER-QUERY
processing
Note 2: EXECUTE_QUERY procedure
Clears the current block, opens a query, and fetches anumber of selected records. If there are
changes tocommit, Forms Builder prompts the operator to committhem before continuing
EXECUTE-QUERYprocessin
Despite there is a literal error in IF : SYSTEM.MODE :=’ENTER-QUERY’THEN
it should be E instead of C.
In ENTER-QUERY mode you cannot navigate anywhere until execute query on that block and that is the reason why you get FRM-41009! So, change mode to NORMAL and FRM is gone.
Correct answer is B.
My mistake, correct answer is C!
A. When you create trigger Key-Exeqry then Fire in Enter-Query Mode property is set to Yes by default so this is not the answer.
B. SYSTEM.mode is read-only variable – you cannot assign value to it.
C. This works! With KEY-ENTQRY you predifine behavior in a sense that form will not enter in QUERY MODE so you can freely navigate to block ‘ORDERS’ and then enter in ENTER QUERY mode.
D. In ENTER-QUERY mode you cannot navigate to block ‘ORDERS’ until you execute query on block ‘ORDER_ITEMS’ .
E. The only problem here is “IF : SYSTEM.MODE :=’ENTER-QUERY’THEN” because you cannot assign value in a condition.
F. In ENTER-QUERY mode you cannot navigate to block ‘ORDERS’ until you execute query on block ‘ORDER_ITEMS’ .
G. Not true.
hi
please tell me …are you attend to study 1z0-151
what version you use????
please answer in my e-mail
great. U helped me
Answer C