0 Replies Latest reply: Apr 20, 2013 4:52 AM by 987536 RSS

    Clear the content of Checkbox without looping for every record

    987536
      Hi all,
      I am Karthik. I am working in Oracle EBS. I am developing one form in which it contain 2 checkbox. if checkbox1 is selected in 1st record it need to check checkbox2 all the record till the end of the block. when i uncheck it need to do reverse. what i facing during unchecking it need to loop through all the record and it assign the value. I use clear_item(even i know it use only for clearing the text_item) it is not working.
      Is there any other way than this to uncheck?


      Please specify apps property for set_block_property, set_window_property,set_item_instances_property,get_item_property,get_item_instance_property


      the procedure is




      /* This Procedure take care of post processing when button copy is pressed in form
                It take care of
                1.If the number of record in the block exceeds 1000 then it display a message, to confirm the copy to proceed
                2.If it less than 1000 then it directly proceed to copy by enabling copy_from and copy_to checkbox.
                3.Once copy button is pressed the label of copy button changed to cancel copy
                4.Cancel copy button is pressed , copy_from and copy_to checkbox is disabled in form
           --------------------------------------------------------------------------------------------------------
           Variable Declaration Purpose
           
           no_alert_button This variable used to track which button is pressed by user when alert message is shown
                                                                                 
           -------------------------------------------------------------------------------------------------------*/
      PROCEDURE PROC_COPY_BTN_FCN IS

           no_alert_button NUMBER;
      BEGIN
                IF      Get_Item_Property('BLK_PROD_PROFILE.BTN_COPY',LABEL)='Copy'
                THEN
                
                     IF PACK_FORM_VAR.no_record_count >1000
                     THEN
                                    Fnd_Message.Set_String('Current Block Contain '|| PACK_FORM_VAR.no_record_count ||' Records. Copy may Take Time');
                                    Fnd_message.Show;
                                    no_alert_button :=Show_Alert('ALERT_RECORD_COUNT');
                                    
                                    IF no_alert_button =ALERT_BUTTON1
                                    THEN
                                              --IF      Get_Item_Property('BLK_PROD_PROFILE.BTN_COPY',label)='Copy'
                                              --     THEN
                                              --     :parameter.G_query_find := 'FALSE';
                                                   Set_Block_Property('BLK_PROD_PROFILE',Query_allowed,property_false);
                                                   App_Special.Enable('FILE.SMARTBAR_FIND',PROPERTY_OFF);
                                              --     set_menu_item_property('VIEW.FIND',ICON_IN_MENU,property_off);
                                                   App_Special.Enable('VIEW.FIND',property_off);
                                              Set_Window_Property('WIN_PROD_PROFILE',WIDTH,10.3);
                                              Set_Block_Property('BLK_PROD_PROFILE',BLOCKSCROLLBAR_POSITION,9.691,.906);
                                                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_CONTINUE',VISIBLE,property_true);
                                                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_TO',VISIBLE,property_true);
                                                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',VISIBLE,property_true);
                                                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',ENABLED,property_true);
                                                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',UPDATE_ALLOWED,property_true);
                                              --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_DESELECT',VISIBLE,property_true);
                                              Go_Item('BLK_PROD_PROFILE.TEXT_PROD_BRAND');
                                              --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',VISIBLE,property_false);
                                                   App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',label,'Cancel Copy');
                                    END IF;
                                              
                ELSE
                                    Set_Block_Property('BLK_PROD_PROFILE',Query_allowed,property_false);
                               App_Special.Enable('FILE.SMARTBAR_FIND',PROPERTY_OFF);
                     --     set_menu_item_property('VIEW.FIND',ICON_IN_MENU,property_off);
                          App_Special.Enable('VIEW.FIND',property_off);
                     Set_Window_Property('WIN_PROD_PROFILE',WIDTH,10.3);
                     Set_Block_Property('BLK_PROD_PROFILE',BLOCKSCROLLBAR_POSITION,9.691,.906);
                          App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_CONTINUE',VISIBLE,property_true);
                          App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_TO',VISIBLE,property_true);
                     App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',VISIBLE,property_true);
                               App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',ENABLED,property_true);
                          App_Item_Property.Set_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',UPDATE_ALLOWED,property_true);
                     --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_DESELECT',VISIBLE,property_true);
                     Go_Item('BLK_PROD_PROFILE.TEXT_PROD_BRAND');
                     --App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',VISIBLE,property_false);
                          App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',label,'Cancel Copy');
                END IF;
                
                ELSIF Get_Item_Property('BLK_PROD_PROFILE.BTN_COPY',label)='Cancel Copy'
                THEN
                          Set_Block_Property('BLK_PROD_PROFILE',Query_allowed,property_true);
                          First_Record;
                          LOOP
                               IF :System.Cursor_Record = PACK_FORM_VAR.no_currec
                               THEN
                                              :BLK_PROD_PROFILE.CKBX_COPY_FROM := 'N';
                                              Set_Item_Instance_Property('BLK_PROD_PROFILE.CKBX_COPY_TO',current_record,UPDATE_ALLOWED,property_true);
                               ELSIF :System.Cursor_Record <> PACK_FORM_VAR.no_currec
                               THEN
                                              :BLK_PROD_PROFILE.CKBX_COPY_TO := 'N';
                                         Set_Item_Instance_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',current_record,UPDATE_ALLOWED,property_true);
                                              Set_Item_Instance_Property('BLK_PROD_PROFILE.CKBX_COPY_FROM',current_record,INSERT_ALLOWED,property_true);
                                    END IF;
                          EXIT WHEN:System.Last_Record ='TRUE';
                          Next_Record;
                          END LOOP;
                          /*     go_item('BLK_PROD_PROFILE.CKBX_COPY_TO');
                               Clear_item;
                                    go_item('BLK_PROD_PROFILE.CKBX_COPY_FROM');
                               Clear_item; */
                               
                               :BLK_PROD_PROFILE.CKBX_SELECT_ALL :='N';
                               --App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_DESELECT',visible,property_false);
                          --     App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_DESELECT',enabled,property_false);
                               App_Item_Property.Set_property('BLK_PROD_PROFILE.CKBX_SELECT_ALL',visible,property_false);
                               App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_COPY',VISIBLE,property_true);
                               App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_COPY',ENABLED,property_true);
                               App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_CONTINUE',VISIBLE,property_false);
                               App_Item_Property.Set_property('BLK_PROD_PROFILE.CKBX_COPY_FROM',VISIBLE,property_false);
                               App_Item_Property.Set_property('BLK_PROD_PROFILE.CKBX_COPY_TO',VISIBLE,property_false);
                               --App_Item_Property.Set_property('BLK_PROD_PROFILE.BTN_DESELECT',label,'Deselect');
                               SET_BLOCK_PROPERTY ('BLK_PROD_PROFILE',BLOCKSCROLLBAR_POSITION,8.5,0.906);
                               set_window_property('WIN_PROD_PROFILE',width,8.9);
                               App_Item_Property.Set_Property('BLK_PROD_PROFILE.BTN_COPY',label,'Copy');
                               App_Special.Enable('VIEW.FIND',property_on);
                               App_Special.Enable('FILE.SMARTBAR_FIND',PROPERTY_ON);
                END IF;

      END;

      Please help me to solve this issue.

      thanks and regards

      Karthik M