Invalid Alert Id 0 (frm-41039)
msMay 23 2008 — edited May 23 2008Hello EveryBody,
I'm using Forms 10g.I'm a begginer to Oracle Forms.
Ther is a field in my form which is No. of PDC.It should allow numeric values only from 1 to 3.
-------------------------------------------------------------------------------------------
So, I have put the following code in ON ERROR
Declare
Lv_v_Prompt VARCHAR2(100);
Lv_n_option NUMBER;
Begin
If Error_Code In (50016,50013,50009) Then
Lpk_Alert.Lp_Show(Get_Item_Property(:System.trigger_item,prompt_text)||' '||
Syadpkg00025.Df_V_Get_Prog_Error_Mesg(:Global.Fv_C_Program_Id,5)||' '|| Df_V_Get_System_Constant_Param(Null,'NO OF PDCS FOR REPORTS',Null)) ;
Elsif Error_Code= 40212 Then
Lv_V_Prompt:= Get_Item_Property(Name_IN('System.Trigger_Item'),PROMPT_TEXT)||': ';
lpk_alert.lp_show('AL_ONE_WARNING',Lv_v_Prompt||Df_V_Get_Error_Mesg(33),Lv_n_option);
Raise Form_Trigger_Failure;
Else
Lp_On_Error;
End If;
Exception
When Form_Trigger_Failure Then
Raise;
End;
--------------------------------------------------
This part from above
*****
If Error_Code In (50016,50013,50009) Then
Lpk_Alert.Lp_Show(Get_Item_Property(:System.trigger_item,prompt_text)||' '||
Syadpkg00025.Df_V_Get_Prog_Error_Mesg(:Global.Fv_C_Program_Id,5)||' '|| Df_V_Get_System_Constant_Param(Null,'NO OF PDCS FOR REPORTS',Null)) ;
*****
where the get_item_property and :system.trigger_item is given does the job of trapping the error when characters etc are involved other than the value 0 to 3.Until this part after running the form this "alert id 0" error was not displayed.Only when i enter the following code that i encountered the specified error.
I have also written in when-validate-item of no. of pdc the following code because i have to validate that if any other number other than 1 to 3 is entered the alert message "enter values between 1 and 3" should be displayed.
This is in when-validate-item of no.of pdc
:Cb_Input_Block.Ti_N_No_Of_Pdc :=Ltrim(Rtrim(:Cb_Input_Block.Ti_N_No_Of_Pdc));
If :Cb_Input_Block.Ti_N_No_Of_Pdc Not Between 1 And Df_V_Get_System_Constant_Param(Null,'NO OF PDCS FOR REPORTS',Null) Then
Lpk_Alert.Lp_Show('CB_INPUT_BLOCK.TI_N_NO_OF_PDC',prompt_text||' '||
Syadpkg00025.Df_V_Get_Prog_Error_Mesg(:Global.Fv_C_Program_Id,5)||' '|| Df_V_Get_System_Constant_Param(Null,'NO OF PDCS FOR REPORTS',Null));
Raise Form_Trigger_Failure;
End If;
------------------------------------------
Please suggest how to solve this problem.
Regards,
Gowtham