Multiple selection list

I have a web form that I need to allow users to select multiple items in a list.  I 'google' and can not find an answer.

The application has 2 parameters.

< %

Dim HoursWorked_PP__varTI

HoursWorked_PP__varTI = '% '.

If (Request.QueryString ("TI") <>"") then

HoursWorked_PP__varTI = Request.QueryString ("TI")

End If

% >

< %

Dim HoursWorked_PP__varPP

HoursWorked_PP__varPP = '% '.

If (Request.QueryString ("PP") <>"") then

HoursWorked_PP__varPP = Request.QueryString ("PP")

End If

% >

< %
Dim HoursWorked_PP
Dim HoursWorked_PP_cmd
Dim HoursWorked_PP_numRows

Set HoursWorked_PP_cmd = Server.CreateObject ("ADODB.Command")
HoursWorked_PP_cmd. ActiveConnection = MM_Connection_STRING
HoursWorked_PP_cmd.CommandText = "SELECT * FROM dbo.vw_HoursWorked WHERE COLUMN_NAME =? and PP =?

HoursWorked_PP_cmd. Prepared = true
HoursWorked_PP_cmd. Parameters.Append HoursWorked_PP_cmd. CreateParameter ("param1", 200, 1, 255, HoursWorked_PP__varTI) ' adVarChar
HoursWorked_PP_cmd. Parameters.Append HoursWorked_PP_cmd. CreateParameter ("param2", 200, 1, 255, HoursWorked_PP__varPP) ' adVarChar

Set HoursWorked_PP = HoursWorked_PP_cmd. Run
HoursWorked_PP_numRows = 0
% >

From my research, I tried:

< %
WorkedDate = Request.form ("WorkedPP") ' info from a string conversion

MakeDate = Replace (WorkedDate, ",", "" OR WorkedPP = "" ") ' replace comma-space of a single quote - or WorkedPP = - singlequote
% >


< %
Dim HoursWorked_PP
Dim HoursWorked_PP_cmd
Dim HoursWorked_PP_numRows

Set HoursWorked_PP_cmd = Server.CreateObject ("ADODB.Command")
HoursWorked_PP_cmd. ActiveConnection = MM_Connection_STRING
HoursWorked_PP_cmd.CommandText = "SELECT * FROM dbo.vw_HoursWorked_PP_Sum WHERE COLUMN_NAME =? and PP = ' "' & MakeDate &" ' "
HoursWorked_PP_cmd. Prepared = true
HoursWorked_PP_cmd. Parameters.Append HoursWorked_PP_cmd. CreateParameter ("param1", 200, 1, 255, HoursWorked_PP__varTI) ' adVarChar
HoursWorked_PP_cmd. Parameters.Append HoursWorked_PP_cmd. CreateParameter ("param2", 200, 1, 255, HoursWorked_PP__varPP) ' adVarChar

Set HoursWorked_PP = HoursWorked_PP_cmd. Run
HoursWorked_PP_numRows = 0
% >

Any help or a point in the right direction?  I'm not sure, but I can't find a solution to allow multiple selection lists.  If I change the query to use IN, then the URL string has always tried to use 'AND' so the results are null.

Thanks for any help!

Crystal

WHERE COLUMN_NAME = lamyae and PP IN ("varPP")

No, what I wanted was that you should analyze varPP and wrap all the values inside quotes. You must also put parens around all this. Therefore, this:

"option 1, option 2, option3 ' who comes to the selection list is converted to this:

'(' option1', 'option2', 'option3').

I posted here a few years ago code to achieve this, but I did not practice routine. See if you can search for it.

Tags: Dreamweaver

Similar Questions

  • Limit of characters in multiple-selection list

    Hi people,

    Throw this out there to see if anyone has had this problem, and how they may have gotten around him.

    It seems that the Multi Select lists have a limit of 1000 characters, i.e. If you select so many items in the list and its over 1000 characters, you cannot save the file.

    I would like to say that ok we will have to just a few lists rather than a big workaround, but the customer fixed the list up in this way, and now that we create the hypersite to allow them to select items in this list, it's possible they could try on the hypersite select all. Clearly, it seems that we will have to have validation on the website to ensure that they do not select more than 1000 characters of a value of items in the list, but it would be useful if there was a way Eloqua to enable this.

    The one you have any ideas/advice?

    Something is very appreciated.

    Thank you

    Andrew Mc.

    I think the challenge is that the multiple-selection list is already built and already used in other functions.

    Andrew - you're right that to resolve this problem, you would have to update the list in Eloqua (again, just the option values, not the option names) and also the list in SFDC - you are on right track here.

    I hope this helps!

  • Delete in the database based on the values of the multiple selection list

    Hello

    I have a selectlist in Apex and a function in the database to make a deletion based on the value selected in the selection list.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    IF v_batch like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = v_batch
       ;
       DELETE FROM so_batch_pa
       WHERE  batch = v_batch
       ;
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;
    The package is called when the user clicks on the button Delete with the rest of the process:
    BEGIN
    DECLARE
    x   varchar2(100);
    BEGIN
    x := pa_control.delete_batch (:P3_BATCH);
    :F105_MESSAGE := x;
    END;
    END;
    Now, I want to change the selectlist for a multiple-selection list to make several batches can be deleted.

    How can I change my procedure and the procedure to remove lots based on the values selected?

    Thank you

    Diana

    dianap says:
    I got this far, but only the first batch selected in the list is being deleted. The other values of selected package are not removed.

    Help please.

    Move the RETURN statement out of your loop.

  • A report of a multiple-selection list-based filtering

    Hey guys,.

    I have an interactive report that should be filtered by a value from a multiple selection list.
    AGENCY Multi-Select
    ----------------------
    ABC:DEF:GHI:DEF
    My question is, if there is a way to compare the: APP_USER to multiple selection list and have a line appears only if she does?

    For example something like a "where" clause
    where APP_USER is Contained within Colon Delimited List "AGENCY"
    See you soon,.
    Mauricio

    Select * from table_name
    where
    InStr (: multi_select_field_name,: app_user, 1) > 0

    Kind regards
    Shijesh

  • as display 2 columns in a multiple select list

    Hi, I want to ask if it is possible to have 2 column display in a multiple selection list.


    in my case, I have a multiple selection list where seminars are displayed, but I also want to add the name of half as exposed as well.

    I have 2 tables:
    Seminar (where the id name and half of seminars are stored)
    semester (semester name)

    My atm code
    select s.name as D,  -- how to add the semester name?  
             s.id as R
    from seminar s, semester sem
    where s.semester = sem.id
    I need to add half as display name


    Thank you for your attention


    Danny

    Hello

    You can do the following:

    select s.name||' '||sem.semester_name as D,  -- how to add the semester name?
             s.id as R
    from seminar s, semester sem
    where s.semester = sem.id
    

    for example, concat the seminar name & name semester

    See you soon
    Matt

  • Facing problem in the multiple selection list...

    Hi Andy,.

    We are facing a problem more...

    In the selection of the Menu... Like u given a solution for dropdownlist hide which works very well... but the same logic does not work for the multiple selection list item. Why so...


    David...

    Published by: David on November 17, 2008 05:22

    Hello

    If you have added in the Page template, then the P39_BATES_DESCRIPTION will not work. As the P63_ATTRIBUTE_CLASS_CODE is not on the page, javascript will throw an error and that will stop the rest of the code to run.

    You can get javascript to test for the existence of a question of fact:

    if ($x('P63_ATTRIBUTE_CLASS_CODE')) {$x('P63_ATTRIBUTE_CLASS_CODE').style.display = 'none';}
    if ($x('P63_ATTRIBUTE_TYPE')) {$x('P63_ATTRIBUTE_TYPE').style.display = 'none';}
    if ($x('P39_BATES_DESCRIPTION')) {$x('P39_BATES_DESCRIPTION').style.display = 'none';}
    

    Andy

  • Multiple selection list limit (or simply select)

    Hello

    Does anyone know if there is a limit to how many upper elements can be presented during the use of a multiple selection (or a shuttle service).

    I have a query that returns hundreds of values (all valid). The user will need to select 1,2,5... all the way to ALL these elements to use in another application.

    When I select ALL returned items, I get an error from browser (Web page not found - error 400). It is in IE 8 (I know, I know, not my choice!).

    Thoughts?

    My shuttle comes from a dynamic LOV which seems to work fine.

    Pete

    The problem is in the limitation of the URL. all values in the list will be passed in the URL, and if it exceeds the limit of length of URL... I'm looking for something that can help

    Sam

  • The MySQL Multiple selection list

    How to make multiple selections in the drop-down list in a form in Dreamweaver 8 and publish on MySQL?

    I tried using implode as recommended here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=12 & catid = 263 & threadid = 1112556 & highlight_key = y & keyword1 = multiple

    It worked unless the user did not select all the items in the list. Then, I got a bad argument error message.

    Then I tried just using POST without the implode and [] at the end of the name, but this put the word 'Picture' in the row/column in the database instead of the data.

    I then tried the POST with [the] on the chosen name and [] in the SQL statement: GetSQLValueString ($_POST [' devices [] ""], "text"), Dreamweaver wouldn't let me associate it under Insert a record in the section of the server behaviors - so nothing is put in the database.

    I need to be able to display multiple selected items in a list box for MySQL, but allow the user to select nothing in the drop-down list without receiving an error.

    Thank you very much for your help. In the end, he has worked with put the [] after the name and the following code:

    GetSQLValueString (isset($_POST['appliances'])? implode ("-", $_POST ['appliances']): "", "text")

  • How to make default an element selected in the multiple selection list

    Hello

    I'm filling the list of multiple selection of a lov (dynamic lov). Is it possible to do by default one of the selected items in the list.

    Please let me know how to do this...

    Thanks /.

    How do you determine that a particular value of the LOV must be the default?
    You should be able to combine the LOV query and your 'default selection' health by using an SQL statement or a pl/sql function and specify it for the 'default value Type' in the section 'Default' definition of the elements page.

    CITY

  • problem in the multiple selection list

    Hello...

    That's my problem... We have a few values in session selection multiple list... these values are highlighted in the list... If wen I try to hide the list im unable to do? I think that its because of the session... wat shal I do nw?

    function hidelist()
    {
    document.getElementById('item_name').style.display = 'none ';
    }

    function showlist()
    {
    document.getElementById('item_name').style.display = 'block ';
    }





    David

    Hi David,

    It is difficult to know what can happen that I can't see your page - this error message indicates that javascript can not see the page element to which you are referring to.

    For example, if I make document.getElementById("ABC").style.display, but the article did a 'BCD' ID I would get this error.

    So, the first thing to check is that the list item is the ID that you think it does. Load the page and do a view Source. Find the selection list and check to see how ID attribute there. If it contains the right ID attribute, then it might be easier if you could save the page view Source and send it to me at... so I can watch it.

    Andy

  • The value of another field using the multiple-selection list

    Hello

    I have a multi select list as USER name name...
    In these cases, I select several users as For example JOHN AND JACK
    Database that should get both their email ID then fill in textarea (separated by commas)

    As I am new to apex, pls help.

    Welcome to this forum... :))

    What is your version of the database?

    If you use database 11g then you can use the following query for your condition,

    select LISTAGG(user_email, ':') WITHIN GROUP (ORDER BY user_email) from table_name
    where INSTR(':'||NVL(:PX_USERNAME,user_name)||':',':'||user_name||':')>0
    

    instead of PX_USERNAME use the name of your multi selection list.

    Use this query in your textfield.

    Thank you
    Lacombe

  • Updating Flash graphic report based on a multiple-selection list

    I have P13_SYMBOL multiselect list item...

    Set property of 'The HTML Form element attributes' P13_SYMBOL onchange = "javascript:getchart (this); »

    I wrote the code to the following HTML header section page.

    < script type = "text/javascript" >
    function getchart (filter)
    {
    get var = new htmldb_Get (null, $v ('pFlowId'), 'APPLICATION_PROCESS is GET_CHART', 0);
    Get.Add ('G_SYMBOL', filter.value);
    var ret = get.get ();
    If (ret)
    {
    var d = document.getElementById ('P13_SYMBOL');
    d.innerHTML = ret;
    }

    Point of Application created G_SYMBOL

    Created GET_CHART Application process as follows.

    DECLARE
    vSymbol VARCHAR2 (100);
    BEGIN
    HTP.p(:G_SYMBOL);
    EXCEPTION WHEN OTHERS THEN
    HTP.p ('no such symbol!');
    END;


    Flash motion graphic flash next.

    Select the label TIMESTAMP, value1, value2 HIGH OPEN, value3 LOW, null, value4 "DCF" CLOSE link "" DAILY_STOCK_QUOTE ".
    where the symbol =: G_SYMBOL
    order of TIMESTAMP

    When I change the symbol chart flash multiselect list does not refresh.
    No idea what is wrong with the code?

    Published by: user8638468 on March 3, 2010 12:39

    Published by: user8638468 on March 3, 2010 17:30

    Here is a link to the post to blog more detailed for those who are interested.

    http://douggault.blogspot.com/2010/03/refreshing-Flash-charts-with-AJAX.html

    Can you please mark it as "answered" if I get the credit for it! ;-)

  • Creation of Validation for the multiple selection list or shuttle point

    Hello
    I'm new to APEX and have questions about the best way to validate the selected shuttle items to verify that they exist in the sys.dba_roles table before submitting. The shuttle point uses a static LOV. I would like to than the error message to display when there is no such thing as a role selected in the element of the shuttle in the sys.dba_roles table.

    Using version 3.2 of APEX
    DB version 9.2.0.8.0
    Internet Explorer version 6

    I tried to create a validation step level about to shuttle P3_ROLE using SQL EXISTS when you press the button SUBMIT. I know that when argued that the shuttle point returns the selected values in a single string delimited by a colon. I use the APEX_UTIL. STRING_TO_TABLE to convert values selected in a table.

    CODE HERE
    declare
    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;
    number of l_num;
    Start
    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P3_ROLE);
    BECAUSE me IN 1.l_selected. COUNTY
    LOOP
    Select 1 from l_num of sys.dba_roles where role = l_selected (i);
    END LOOP;
    end;

    This is the error ORA-00928: lack of SELECT keyword
    1006 - ERR error in the validation routine.

    Any advice? Thoughts? Thank you.

    Published by: Violet on Oct 14, 2010 14:50

    Hello

    Your code is PL/SQL block. You cannot use this type of validation with your code.

    Try to change the body type of the function that returns the error text and
    code for this one

    DECLARE
      l_selected APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_num NUMBER;
    BEGIN
      l_selected := APEX_UTIL.STRING_TO_TABLE(:P3_ROLE);
      FOR iIN 1..l_selected.COUNT
      LOOP
        SELECT count(1) INTO l_num FROM sys.dba_roles WHERE role = l_selected(i);
        IF l_num = 0 THEN
          RETURN 'Role not exists';
        END IF;
      END LOOP;
      RETURN NULL;
    END;
    

    Kind regards
    Jari

  • How to use the multiple selection list values in sql query

    Hi all
    In the search form, I have a multiselect llist tell (P3_STATUS) and I want to have a query using this element and fetch documents
    How to do a sql query based on the selection of the value of this element.
    SELECT "W"."START_DT" "Start Date",
           "W"."CAMPAIGN_CODE" "Campaign Name",  
           "W"."MKT_CHANNEL" "Channel",
           "W"."MKT_SUB_CHANNEL" "Sub Channel", 
           "W"."PROMO_CODE" "Promo Code",
           "W"."TRACKING_CODE" "Tracking Code",
           "W"."TFN" "TFN",
           "W"."STATUS" "Status",
           "W"."CAMPAIGN_CODE" "Edit"
           FROM 
             "WC_MKT_CAMPAIGN_DS" "W"
      
           WHERE 
         (MKT_CHANNEL = decode(:P1_CHANNEL,'%null%',MKT_CHANNEL,NULL,MKT_CHANNEL,:P1_CHANNEL))
       AND
    (MKT_SUB_CHANNEL= decode(:P1_SUB_CHANNEL,'%null%',MKT_SUB_CHANNEL,NULL,MKT_SUB_CHANNEL,:P1_SUB_CHANNEL))
    AND *STATUS = decode(.................*
    Please could someone help me on this?

    Thanks in advance
    Robert L

    Try to change your selection of status to

    AND INSTR(':'||:P3_STATUS||':',':'||STATUS||':') > 0
    
  • Maximum number of list to multiple selection on a page

    Greetings,

    I use the Application Express 4.2.1.00.08. I have a problem in one of my pages. I have several items (123 from today ' hui), and two of them are lists of multiple selections. They are all the same... created is based on a named LOV, together forever, used Source Source Type defined on the database column... and they all work fine, except the last. Don't just save to the database.

    I tried:
    -Delete and recreate from scratch - does not save
    -Deletion and recreation of one copy of another list selection multiple work - does not save
    -Change the view state for one of my multiple selections of work lists to never (to have a less rendered multiselect list) - does not save
    -Keep everything the same but by changing the type of element (text field) - saves
    -Keeping all the same, but change to a normal selection list (no) - saves

    So, I came to the point of wondering... is there a limit on how many multiple-selection list can be on a page?

    If so, does anyone know a kind of workaround?
    If this isn't the case, anyone has an idea why I'm having this problem?

    Thank you for your comments,
    Mathieu

    I found something. If I move the item to another region, it works again, but not in all regions. I tried to create a new region and delete my article in there, but it doesn't seem to work. I'll keep looking.

    Thank you
    Mathieu

Maybe you are looking for

  • Update freezes

    Guys and girls, For the 3 latest updates of MacOs 10.11 my computer freezes during restart. After installation, it evolves into a dialog box which asks a selection and will not take any input. The only way out is to do a hard restart using the switch

  • Is it possible to disable or remove an add-on from the outside of the FF (it does not start after adding an addon)

    I installed the addon and now FF won't start and seems to be a loop. Is it possible to uninstall the addon or configure FF so that it starts with disabled addons? Don't forget that FF does not at all so I don't have access to one of the internal func

  • Slowing down tear of the drive

    Hello, I'm new to these maps and I will start my saying, I am extremely frustrated, so wear my grammar. I have audio books on CD, disk can have several "chapters" all on the same volume/length. the extraction moves quickly enough through the first ch

  • Change region HP C7100

    Hi all I have a HP C7100 while a printer that I bought when I lived in Dubai. I know live in New Zealand and require the cartridges that are not compatible with the region, located on the printer. Can someone tell me how to change the region on this

  • NO SOUND ON MY COMPUTER XP

    Hi, I have a ThinkCentre desktop computer, and I restored recently my computer to the factory settings and since then the audio has not worked, apparently I need an audio driver and I don't know what to install and what not. This information is what