PROCEDURE event (event_name VARCHAR2)
IS
form_name VARCHAR2 (30) := NAME_IN (’system.current_form’);
block_name VARCHAR2 (30) := NAME_IN (’system.cursor_block’);
zoom_value VARCHAR2 (30);
GROUP_ID recordgroup;
col_id groupcolumn;
BEGIN
IF (event_name = 'ZOOM')
THEN
IF (form_name = 'EXECISE2' AND block_name = 'EMP')
THEN
-- SET UP THE RECORD GROUP
GROUP_ID := FIND_GROUP ('my_zooms');
IF ID_NULL (GROUP_ID)
THEN
GROUP_ID := CREATE_GROUP ('my_zooms');
col_id := ADD_GROUP_COLUMN (GROUP_ID, 'NAME', char_column, 30);
col_id := ADD_GROUP_COLUMN (GROUP_ID, 'VALUE', char_column, 30);
SET_LOV_PROPERTY ('APPCORE_ZOOM', group_name, 'my_zooms');
ELSE
DELETE_GROUP_ROW (GROUP_ID, all_rows);
END IF;
ADD_GROUP_ROW (GROUP_ID, 1);
SET_GROUP_CHAR_CELL ('my_zooms.NAME', 1, 'Department Form');
SET_GROUP_CHAR_CELL ('my_zooms.VALUE', 1, 'DEPARTMENT');
ADD_GROUP_ROW (GROUP_ID, 2);
SET_GROUP_CHAR_CELL ('my_zooms.NAME', 2, 'Employee Form');
SET_GROUP_CHAR_CELL ('my_zooms.VALUE', 2, 'EXERCISE1');
-- test the LOV results and open different forms
IF SHOW_LOV ('APPCORE_ZOOM')
THEN
zoom_value := NAME_IN ('parameter.APPCORE_ZOOM_VALUE');
IF zoom_value = 'DEPARTMENT'
THEN
fnd_function.EXECUTE (function_name => 'DEPARTMENT',
open_flag => 'Y',
session_flag => 'Y'
);
ELSIF zoom_value = 'EXERCISE1'
THEN
fnd_function.EXECUTE (function_name => 'EXERCISE1',
open_flag => 'Y',
session_flag => 'Y'
);
END IF;
END IF;
END IF;
END IF;
END event;
/
No comments:
Post a Comment