Home » Developer & Programmer » Forms » need to change the select all button after clear the records
need to change the select all button after clear the records [message #623148] Fri, 05 September 2014 04:00 Go to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi all,

1) select order_no LOV and clicked on the Query Button it displays data into the the Multi block

2) then after i am clicked on the Select All Button and after that i am clicking on the MOVE button

3) after that i am clearing the multi records (when clicked on the Clear Button) ,But after clears all the Records , the Select All button shows me Deselect All , ok it is fine because we wrote code in the
Select All as per our convinient
I need to show Select All button as Select All after clicked on the clear Button

Please help me

Thanks,

[Updated on: Fri, 05 September 2014 04:01]

Report message to a moderator

Re: need to change the select all button after clear the records [message #623150 is a reply to message #623148] Fri, 05 September 2014 04:04 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
So fix the code that changes the label on the select all button. Or add some extra code to change it in the clear button.
We don't know what code you currently have that controls what the button label is.
Re: need to change the select all button after clear the records [message #623152 is a reply to message #623150] Fri, 05 September 2014 04:15 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
Or add some extra code to change it in the clear button

Thanks for early reply cookiemonster, can you please send what code need to be add in the clear button?
Re: need to change the select all button after clear the records [message #623156 is a reply to message #623152] Fri, 05 September 2014 04:57 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
There's existing code that changes the label right?
So look at what that does and copy the appropriate bits.
Re: need to change the select all button after clear the records [message #623280 is a reply to message #623156] Sun, 07 September 2014 23:44 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Hi cookiemonster, please help me which part of code need to be changed? which part of the code need to add in the CLEAR Button
 DECLARE
    v_total   NUMBER;
    v_message VARCHAR2(300);
    v_count   NUMBER := 0;
    v_label   VARCHAR2(50);
BEGIN
    v_label := Get_item_property('SELECT_ALL', label);

    IF v_label = 'Select All' THEN
      first_record;

      WHILE :System.last_record != 'TRUE' LOOP
          IF .....then
            :SELECTED_FLAG := 'Y';
            v_count := v_count + 1;
          END IF;

          next_record;
      END LOOP;

      IF :System.last_record = 'TRUE' THEN
        IF ....then
          :SELECTED_FLAG := 'Y';
          v_count := v_count + 1;
        END IF;
      END IF;

      v_label := 'Deselect All';

      Set_item_property('SELECT_ALL', label, v_label);

      first_record;

      fnd_message.Set_string('Total '||v_count||' Records selected.');

      fnd_message.show;
    ELSIF v_label = 'Deselect All' THEN
      first_record;

      WHILE :System.last_record <> 'TRUE' LOOP
          IF :SELECTED_FLAG = 'Y' THEN
            :SELECTED_FLAG := 'N';   
          END IF;

          next_record;
      END LOOP;

      IF :System.last_record = 'TRUE' THEN
        IF :SELECTED_FLAG = 'Y' THEN
          :SELECTED_FLAG := 'N';
        END IF;
      END IF;

      first_record;

      v_label := 'Select All';

      Set_item_property('SELECT_ALL', label, v_label);
    END IF;
END;  
Re: need to change the select all button after clear the records [message #623297 is a reply to message #623280] Mon, 08 September 2014 03:00 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is it really too much effort to think to tell us what trigger that code is from?
Re: need to change the select all button after clear the records [message #623306 is a reply to message #623297] Mon, 08 September 2014 03:14 Go to previous messageGo to next message
mist598
Messages: 1195
Registered: February 2013
Location: Hyderabad
Senior Member
Quote:
So fix the code that changes the label on the select all button. Or add some extra code to change it in the clear button.
We don't know what code you currently have that controls what the button label is.

Quote:
Is it really too much effort to think to tell us what trigger that code is from?

Hi cookiemonster, that code is in the When-button-pressed
Re: need to change the select all button after clear the records [message #623307 is a reply to message #623306] Mon, 08 September 2014 03:18 Go to previous message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
And your form has multiple buttons. A sensible idea would be to state which one.
Previous Topic: Menu roles in Forms 3.0
Next Topic: 100501; Non -oracle exception
Goto Forum:
  


Current Time: Thu Apr 18 21:07:59 CDT 2024