This discussion is archived
4 Replies Latest reply: Apr 4, 2013 4:25 PM by indra budiantho RSS

Select all option in a LOV

Anita.I Newbie
Currently Being Moderated
Hi ,

I have a LOV in which I would like to include a 'Select All' record. Selecting this would select all the records in the LOV and place it in the tabular form .

Is this possible/feasible?
  • 1. Re: Select all option in a LOV
    HamidHelal Guru
    Currently Being Moderated
    Anita.I wrote:
    Hi ,

    I have a LOV in which I would like to include a 'Select All' record. Selecting this would select all the records in the LOV and place it in the tabular form .

    Is this possible/feasible?
    Not possible and also feasible. Use cursor and insert data in your block.

    Hope this helps


    Hamid


    Mark correct/helpful to help others to get right answer(s).*
  • 2. Re: Select all option in a LOV
    Amatu Allah Guru
    Currently Being Moderated
    Hi

    lov would select all records specified in a record group but Will assign values of only one record so i would suggest u using a cursor to select the specified records in a record group then displaying these records in a tabular form through a loop.

    Amatu Allah
  • 3. Re: Select all option in a LOV
    InoL Guru
    Currently Being Moderated
    Do you really have an LOV (which is a lookup for a single value) or a search box with an LOV attached to it? Like a search box for employees where you have "All employees" and the individual names.
    In that case, you can have a multi record block based on the EMP table, and a default where clause that looks something like:

    ename = :block.search_item
    or :block.search_item = 'All employees'
  • 4. Re: Select all option in a LOV
    indra budiantho Expert
    Currently Being Moderated
    use union:
    select 'ALL' employee_name
    from DUAL
    union
    select employee_name
    from employee 
    and when 'ALL' is selected you can query like this:
    select employee_name
    from employee 
    where employee_name = decode(:control.lov,'ALL',employee_name,:control.lov)
    Edited by: indra budiantho on Apr 4, 2013 4:25 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points