1Z0-151 · Question #19
View the Exhibit. The Summit menu is attached to the Orders form. The Toggle Autoquery menu item is a check box that toggles whether a query is automatically performed when the Orders form is first…
The correct answer is A. Change FIND_ITEM to FIND_MENU_ITEM. F. Change GET_ITEM_PROPERTY to GET_MENU_ITEM_PROPERTY G. Change SET_ITEM_PROPERTY to SET_MENU_ITEM_PROPERTY. A: Note: FIND_MENU_ITEM built-in Searches the list of menu items and returns a menu item ID when it finds a valid menu item with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of MenuItem. FIND_ITEM…
Question
View the Exhibit. The Summit menu is attached to the Orders form. The Toggle Autoquery menu item is a check box that toggles whether a query is automatically performed when the Orders form is first invoked. If the check box is deselected, users must manually query. In addition to using the menu, users want to be able to toggle the autoquery preference directly from the form. You add a button named Toggle Autoquery with the following When-Button- Pressed trigger:
DECLARE mi_id MENUITEMS; BEGIN mi_id ;=FIND_ITEM ('Preferences.AutoQuery') /* Determine the current checked static of the AutoCommit menu checkbox item And toggle the checked state*/ IF GET_ITEM_PROPERTY (mi_id, CHECKED) = 'TRUE' THEN SET_ITEM_PROPERTY (mi_id, CHECKED, PROPERTY_FALSE); ELSE SET_ITEM_PROPERTY (mi_id, CHECKED, PROPERTY_TRUE); END IF; END; However, the trigger does not compile. What three changes must you make so that the trigger compiles successfully?
Exhibit
Options
- AChange FIND_ITEM to FIND_MENU_ITEM.
- BChange 'preferences.AutoQuery' to 'orders.preferences.AutoQuery'.
- CChange 'preferences.AutoQuery' to 'AutoQuery'.
- DChange 'preferences.AutoQuery' to 'ORDERS.PREFERENCES>AUTOQUERY'.
- EChange 'preferences.AutoQuery' to 'AUTOQUERY'.
- FChange GET_ITEM_PROPERTY to GET_MENU_ITEM_PROPERTY
- GChange SET_ITEM_PROPERTY to SET_MENU_ITEM_PROPERTY
- HChange PROPERTY_FALSE to 'FALSE'.
How the community answered
(46 responses)- A72% (33)
- C15% (7)
- D4% (2)
- E2% (1)
- H7% (3)
Explanation
A: Note: FIND_MENU_ITEM built-in Searches the list of menu items and returns a menu item ID when it finds a valid menu item with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of MenuItem. FIND_ITEM built-in Searches the list of items in a given block and returns an item ID when it finds a valid item with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of Item. Example (with FIND_MENU_ITEM, GET_MENU_ITEM_PROPERTY, SET_MENU_ITEM_PROPERTY) FIND_MENU_ITEM examples ** Built-in: FIND_MENU_ITEM ** Example: Find the id of a menu item before setting ** multiple PROCEDURE Toggle_AutoCommit_Mode IS val VARCHAR2(10); mi_id := Find_Menu_Item('Preferences.AutoCommit'); ** Determine the current checked state of the AutoCommit ** menu val := Get_Menu_Item_Property(mi_id,CHECKED); ** Toggle the checked state IF val = 'TRUE' THEN Set_Menu_Item_Property(mi_id,CHECKED,PROPERTY_FALSE); ELSE Set_Menu_Item_Property(mi_id,CHECKED,PROPERTY_TRUE); END IF;
Topics
Community Discussion
No community discussion yet for this question.
