0 Replies Latest reply: Feb 21, 2013 10:15 AM by user_anumoses RSS

    Oracle forms when-validate-trigger

    user_anumoses
      Forms [32 Bit] Version 10.1.2.0.2 (Production)
      Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
      With the Partitioning, OLAP and Oracle Data Mining options
      JServer Release 9.2.0.8.0 - Production
      Oracle Toolkit Version 10.1.2.0.2 (Production)
      PL/SQL Version 10.1.0.4.2 (Production)
      Oracle Procedure Builder V10.1.2.0.2 - Production
      PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
      Oracle Query Builder 10.1.2.0.2 - Production
      Oracle Virtual Graphics System Version 10.1.2.0.2 (Production)
      Oracle Tools GUI Utilities Version 10.1.2.0.2 (Production)
      Oracle Multimedia Version 10.1.2.0.2 (Production)
      Oracle Tools Integration Version 10.1.2.0.2 (Production)
      Oracle Tools Common Area Version 10.1.2.0.2
      Oracle CORE     10.1.0.4.0     Production

      -----------------------
      I have a field called equip_code. has list of values
      once the value is chosen I have this code

      if :parameter.EQUIP_USED_OTHERDRIVE is null then     

      case msgbox.show('Equip Code ', 'Equipment selected currently being used on drive - '
      ||v_drive_id
           ||chr(10)||'Please verify and contact Supervisor.'
      ||chr(10)||'Are you sure you want to continue?'
      ||chr(10)||'If Yes please enter comments in the comment box','note','NO', 'YES')
      when ALERT_BUTTON2 then
      :parameter.EQUIP_USED_OTHERDRIVE := 'Y';

      l_timer := Create_Timer('Nav_Timer2', 1, NO_REPEAT);

      when ALERT_BUTTON1 then

      :parameter.EQUIP_USED_OTHERDRIVE := 'N';
      :qc_equipment_used2.equip_code := null;
           :qc_equipment_used2.equip_DESC := NULL;( at this point they can re-choose the equipment)
      end case;
      End if;

      if :parameter.NON_ASSIGNED_EQUIP_CODE is null then

           case msgbox.show('Equip Code', 'Equip Code - '||:qc_equipment_used2.equip_code
                          ||' Chosen is not assigned to your department.'
                          ||chr(10)||'Are you sure you want to Continue?'
                          ||chr(10)||'If Yes please enter comments in the comment box', 'note', 'NO', 'YES')
           when ALERT_BUTTON2 then
           :parameter.NON_ASSIGNED_EQUIP_CODE := 'Y';

      l_timer := Create_Timer('Nav_Timer3', 1, NO_REPEAT);

           when ALERT_BUTTON1 then

           :parameter.NON_ASSIGNED_EQUIP_CODE := 'N';
      :qc_equipment_used2.equip_code := NULL;
           :qc_equipment_used2.equip_DESC := NULL;
      End case;

      in my code for when-timer-expired I have this code

      IF ( Get_Application_Property(Timer_Name) = 'NAV_TIMER2' ) THEN
      If :parameter.EQUIP_USED_OTHERDRIVE = 'Y' then
      go_item('qc_equipment_used2.V_EQUIP_USED_COMMENTS');
      End if;
      ELSIF ( Get_Application_Property(Timer_Name) = 'NAV_TIMER3' ) THEN
           If :parameter.NON_ASSIGNED_EQUIP_CODE = 'Y' then
           go_item('qc_equipment_used2.comments');
           End if;
      Else
           go_item('qc_equipment_used2.procedure_button');
      END IF;

      What I need here is one message fires and then open the comment box that is there in the when-timer-expired.
      Whats happening is the first message fires and does not go to the comment box. but the second message fires and then the first comment box opens. so go_item('qc_equipment_used2.comments'); fires here . But the second comment box does not come. go_item('qc_equipment_used2.V_EQUIP_USED_COMMENTS'); does not fire.

      I want the message and when user acknowledges, I want the go-item to fire.
      May be a way in when-timer-expired let the when-validate-item trigger fire again after the first message is acknlowledged and comment box is closed and then the second message comes up and then go-item fires.Any help is appreciated.