What changes must you make to the code so that the menu code functions as it does in the form?

The Orders form is sometimes run automatically and sometimes run from the Customers form,
when it is run from the Customers form, any queries should be restricted to the customer that is
currently selected. The Customers form button that runs the Orders form sets a global variable to
the current customer ID.
The Orders form has a button labeled Execute Query with the following When-Button Pressed
trigger:
DEFAULT_VALUE (NULL, ‘GLOBAL.Customer_id’);
IF: GLOBAL.customer_id IS NOT NULL
THEN
SET_BLOCK_PROPERTY (‘orders’, DEFAULT_WHERE, ‘orders.customer_id =
‘ | | :GLOBAL.CUSTOMER_id);
END IF;
EXECUTE_QUERY
You want to duplicate that functionality in a menu item for the Summit menu that is attached To
the Orders form.
What changes must you make to the code so that the menu code functions as it does in the form?

The Orders form is sometimes run automatically and sometimes run from the Customers form,
when it is run from the Customers form, any queries should be restricted to the customer that is
currently selected. The Customers form button that runs the Orders form sets a global variable to
the current customer ID.
The Orders form has a button labeled Execute Query with the following When-Button Pressed
trigger:
DEFAULT_VALUE (NULL, ‘GLOBAL.Customer_id’);
IF: GLOBAL.customer_id IS NOT NULL
THEN
SET_BLOCK_PROPERTY (‘orders’, DEFAULT_WHERE, ‘orders.customer_id =
‘ | | :GLOBAL.CUSTOMER_id);
END IF;
EXECUTE_QUERY
You want to duplicate that functionality in a menu item for the Summit menu that is attached To
the Orders form.
What changes must you make to the code so that the menu code functions as it does in the form?

A.
Change both occurrence of :GLOBAL.customer_idto’GLOBAL.customer_id’.

B.
Change’GLOBAL.customer_id’inline 1 to :GLOBAL.customer_id.

C.
Change both occurrence of :GLOBAL.customer_id to NAME_IN(‘GLOBAL.customer_id’).

D.
You do not need to change anything; the code compiles and functions correctlyinthe menu
item.

E.
You cannot add this type of codeinthe menu because it refers to the items on the form that
cannot be referenced from a menu.

Explanation:
Because you cannot refer directly to form values in menu code, change
:GLOBAL.customer_id to the following indirect reference: NAME_IN(‘GLOBAL.customer_id’)

Note: You could also change the references to the global variable to use the NAME_IN built-in;
however, this is not strictly necessary, because global variables are available directly throughout
the application.
Reference: Managing Oracle Forms Menu Modules



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Padmanabhan

Padmanabhan

Answer E

ngayathri81

ngayathri81

As per what I checked, D is the correct answer

abdel

abdel

Answer is D 100%