1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| DECLARE
list_element VARCHAR2(10);
list_element_to_delete VARCHAR2(10);
loop_index_var Number;
total_list_count Number;
Begin
If :B1.LIST_CH_REGIONS is not null then
total_list_count := Get_List_Element_Count('B1.LIST_CH_REGIONS');
-- Pour afficher une alerte
DECLARE al_id Alert;
al_button NUMBER;
BEGIN
al_id := Find_Alert('ALERT_IGNORE3');
IF Id_Null(al_id) THEN
Message('l''alerte n''existe pas');
RAISE Form_Trigger_Failure;
ELSE
-- Afficher l'alerte
al_button := Show_Alert(al_id);
-- Confirmation
IF al_button = ALERT_BUTTON1 THEN
al_id := Find_Alert('ALERT_IGNORE2');
IF Id_Null(al_id) THEN
Message('L''alerte ALERT_IGNORE2 n''existe pas');
RAISE Form_Trigger_Failure;
ELSE
al_button := Show_Alert(al_id);
IF al_button = ALERT_BUTTON1 THEN
list_element_to_delete := :B1.LIST_CH_REGIONS;
END IF;
END IF;
END IF;
END IF;
END;
-- fin affichage alerte
For loop_index_var in 1..total_list_count loop
list_element := GET_LIST_ELEMENT_value('B1.LIST_CH_REGIONS', loop_index_var);
IF list_element_to_delete = list_element THEN
Delete_List_Element('B1.LIST_CH_REGIONS', loop_index_var);
Exit;
END IF;
End Loop;
End if;
End; |