Home » Developer & Programmer » Application Express & MOD_PLSQL » Select multiple value in LOV (Apex)
Select multiple value in LOV [message #306823] Mon, 17 March 2008 00:35 Go to next message
benseer
Messages: 22
Registered: October 2005
Location: Bangalore
Junior Member
Hi,

How can I select mulitple values in a LOV

For Eg: I have a dropdown LOV with department names from table Dept,

I want to select values "Reserach" & "Sales" and those values to be returned. How can I achieve this ?




Re: Select multiple value in LOV [message #306921 is a reply to message #306823] Mon, 17 March 2008 05:06 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
hi

multiple column value can be concatenated using pipe and can
be returned as single return value and can be stored in page item. subsequently using substr or instr you shall break the data
and store it in different page items.

Re: Select multiple value in LOV [message #306960 is a reply to message #306921] Mon, 17 March 2008 06:36 Go to previous messageGo to next message
benseer
Messages: 22
Registered: October 2005
Location: Bangalore
Junior Member
Its not multiple column value , its multiple values from single column, Hope u didnt notice example ..

I was refering to dept table..
Re: Select multiple value in LOV [message #306978 is a reply to message #306960] Mon, 17 March 2008 07:17 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
sorry

i read in between lines.

i also do not know the answer

yours

dr.s.raghunathan
Re: Select multiple value in LOV [message #307018 is a reply to message #306823] Mon, 17 March 2008 09:49 Go to previous messageGo to next message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
You can use a shuttle to select multiple values. The left side of the shuttle is filled with an LOV. The return value of this shuttle is a colon delimited string. Using SUBSTR and INSTR you can retrieve values . . .
Re: Select multiple value in LOV [message #330455 is a reply to message #307018] Mon, 30 June 2008 03:52 Go to previous messageGo to next message
mtahiliani
Messages: 1
Registered: June 2008
Junior Member
Hello,

I too have a similar requirement. Can you please elaborate on how to achieve this functionality i.e how to use shuttle in Apps parameter screen for a LOV?

Thanks in advance.

Regards,
Madhur
Re: Select multiple value in LOV [message #352399 is a reply to message #306823] Tue, 07 October 2008 08:12 Go to previous message
c_stenersen
Messages: 254
Registered: August 2007
Senior Member
You can use a multiselect list for this. The item will then return the values separated by colons.

If you have the item P1_X and want to set it to the values "Research" and "Sales" so that they are selected when entering the page, you can simply have a computation with a static assignment setting the value to Research:Sales.

When fetching the values chosen, you don't have to use instr. ApEx has a function for splitting this into an array so that you can loop trough the chosen values.

APEX_UTIL.STRING_TO_TABLE (
    p_string       IN VARCHAR2,
    p_separator    IN VARCHAR2 DEFAULT ':') 
    RETURN APEX_APPLICATION_GLOBAL.VC_ARR2;


So for the item P1_X you could write:
declare
    v_p1_x_arr apex_application_global.vc_arr2;
begin
    v_p1_x_arr := apex_util.string_to_table(:P1_X);
    for i in 1..v_p1_x_arr.count loop
        --Do something using v_p1_x_arr(i)
    end loop;
end;
Previous Topic: how to view procedure in browser written in mod_plsql.
Next Topic: csv export doesn't want to export link column
Goto Forum:
  


Current Time: Sat Jul 26 04:38:08 CDT 2014

Total time taken to generate the page: 0.27610 seconds