Application Development (the resource worksheet file) Step 5 This step created a monitoring mechanism that activates a program operation or displays a data field based on the user's menu selection. In Step #3, the &MENU macro was used to create a selection menu (RESOURCE RECORD). To activate the macro in cell [K2], move the cursor to cell [K2] and press [F10] [Enter]. The five item menu "RESOURCE RECORD" is displayed in the upper right hand corner of the monitor screen. If item "D" is selected (press "D"), the value "4" is placed in cell [M2]. The following &CHOOSE macro monitors cell [K2] and implements the selection specified from the menu by moving to the secondary worksheet environment (Global) and displaying the data field that corresponds to the specified menu choice. The format of the &CHOOSE macro statement is as follows: &CHOOSE(M2,N2,N3,N4,N5,N6,N7,N8) [&CHOOSE] The label that defines the "choose" macro. [M2] This is the cell location that will be monitored for the selection key value. This cell location is the same as that specified in the &MENU macro statement for the placement of the menu selection value. [N2] This is the cell address at which a macro will be executed when item "A" (Resource Profile) is selected in the menu. [N3] This is the cell address at which a macro will be executed when item "B" (Historic Significance) is selected. [N4] This is the cell address at which a macro will be executed when item "C" (Maintenance Management) is selected. [N5] This is the cell address at which a macro will be executed when item "D" (Site Description) is selected. [N6] This is the cell address at which a macro will be executed when item "E" (Special Conditions) is selected. [N7] This is the cell address from which a macro will be executed when item "F" (Image Processing) is selected. [N8] This is the cell address from which a macro will be executed when item "E" (Return to Main Level) is selected. The macro statements located in cells [N2] through [N6] are identical except for the cell location that they reference. The macro that is located in cell [N2] is as follows: &GLOBAL &GOTO A7 [&GLOBAL] Switches the current environment from the Virtual to the Global worksheet. This macro displays the Global worksheet that was loaded in Step 4 (RSUN.CRS) as the current worksheet environment. [&GOTO] Sends the display to a specified cell location. [A7] This is the specified cell that becomes the current displayed location when &GOTO is executed. Cell [A7] is the starting location for the "Resource Profile" data field which is referenced by menu item "A." The macros located in cells [N3], [N4], [N5], and [N6] have the identical structure, differing only in the cell locations that are referenced. For example, the macro located in [N3] sends a display to cell [A28] which is the "Historic Significance" field of the individual employee's record. The macro in [N4] references cell [A48] which is the "Maintenance Record" data field. Index to the Appendices Application Development 4. Graphics Processing