Passing Multiple Values from Multi Select

Hi,
My requirement is simple. I have created a simple Multi Select Option in parameter form and i want to send multiple selected values from the multi select option (in parameter form) to reports.
eg:
I want to send multiple countries code as input .........'US', 'CA', 'IND', 'UK'
Can i do it in Oracle 6i reports, Thanks in Advance.
Regards,
Asgar

Hi Thanks Again,
For such a nice response. I got the Lexical Where condition properly running but still getting problems in catching the multiple values to be passed from form. just i will give u an insight of wat i have done:
SQL:
SELECT ALL FROM EMPLOYEES &cond_1* -- Working FIne
in my Html Parameter Form i have an Multi Select component (the Problem is here) it is not passing more than i value from the form once i am accessing it from web or running it in paper report. In paper report layout it is not allowing me to select more than one value. but in HTML it is allowing to select multiple values but at the server end (After Parameter Form Trigger) it is giving a single value not multiple values.
In PL/SQL when i checking the length of country_id i m getting it as one.
Here is my SQL code
srw.message(10, LENGTH(:country_id_1));
:cond_1 := 'where country_id = '''|| :country_id_1 ||'''';
This is passing the condition properly to SQL but only with single value but i want to pass multiple values
I am struck in this+_
WHERE CONTRY_COLUMN IN ('USA','UAE') -- This variable you have to pass from you form...
Here as you said you gave multiple selection in your parameter form to generate report. So before generation report just prepare variable like this as it is bold above.
and pass parameter through your runtime form to the report as you pass the normal parameter...liket this i gave you example...
ADD_PARAMETER(PARAMETER_LIST_NAME,'P_CONT_PARAM',TEXT_PARAMETER,vString);
Sorry for troubling you for a small thing but please help me to solve this issue.
Thanks Again............
Asgar.

Similar Messages

  • Filtering a sharepoint 2010 list using Multiple values from Multi-Select Filtering In Infopath 2010 form

    I am creating a browser based InfoPath 2010 form Calendar Filtering
    using SharePoint 2010 Calendar List (All Events) and InfoPath 2010.  This form has data connection to the Calendar list. Goal is to
    compare Calendar Events from Current Year to Previous Year. I have 2 columns called - Previous Year and Current Year. I have 2 drop-down controls in each columns called
    Select Year  and Select Week. I also have common drop down called
    Select Category which holds category of the events such as weather, power outages and so on. I wish to display specific events on specific date and specific week on both columns.
    I am able to filter the list based upon Year and Week
    on both these columns by applying rules in the InfoPath 2010 form. The real issue is that I want to apply category filter on the search result of
    Year and Week. Or it needs to show all the values if I
    select Category value as All. So I wish to apply filter on Search results using Category drop-down list selection.
    Hope I could explain this better but I tried to do the best here. Any suggestions, hint, or pointers
    Thanks
    Snehal H Rana
    Thanks Snehal H.Rana SharePoint Consultant

    I am creating a browser based InfoPath 2010 form Calendar Filtering
    using SharePoint 2010 Calendar List (All Events) and InfoPath 2010.  This form has data connection to the Calendar list. Goal is to
    compare Calendar Events from Current Year to Previous Year. I have 2 columns called - Previous Year and Current Year. I have 2 drop-down controls in each columns called
    Select Year  and Select Week. I also have common drop down called
    Select Category which holds category of the events such as weather, power outages and so on. I wish to display specific events on specific date and specific week on both columns.
    I am able to filter the list based upon Year and Week
    on both these columns by applying rules in the InfoPath 2010 form. The real issue is that I want to apply category filter on the search result of
    Year and Week. Or it needs to show all the values if I
    select Category value as All. So I wish to apply filter on Search results using Category drop-down list selection.
    Hope I could explain this better but I tried to do the best here. Any suggestions, hint, or pointers
    Thanks
    Snehal H Rana
    Thanks Snehal H.Rana SharePoint Consultant

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • Show selected value from multi-selected parameter in crystal report

    Dear Experts!
         i would like to ask how to catch selected value from multi-selected parameter to show in report header section.
    Thanks in advance.

    Hi Dara,
    If this is a string prompt then you could simply create a formula with this code and place it on the report header:
    Join({?Prompt name},", ")
    -Abhilash

  • Passing Multiple Values from a worksheet to PL/SQL function.

    Hi All,
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    I will try to explain the scenario:
    We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
    Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
    As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    Or any other work arounds for the scenario explained?
    Reagrds,
    Jeneesh

    Hi Russ,
    Thanks for the response.
    Russ Proudman wrote:
    1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
    We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
    We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
    Russ Proudman wrote:
    2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
    Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
    Russ Proudman wrote:
    3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
    Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
    Regards,
    Jeneesh

  • How to pass multiple values from master to child report

    Hello,
    How would I pass multiple prompts from the master to child report? So for example, say I want to pass a 'Country' value along with a 'City' value
    Would it be?
    ="<a href=\"../../opendoc/openDocument.jsp?iDocID=ASQlgCemIOlEid1HHUlzyPs&sDocName=DocTest&sIDType=CUID&sType=wid&sWindow=Same&lsSCountry="+[Country]+"&lsSCity="+[City]+"\</a>"
    Thanks,
    Carter

    Carter,
    what is the syntax for this?
    It is exactly how you have posted in your original note.
    "&lsSCountry="+[Country]+"&lsSCity="[City]
    This will work providing the target report has a prompt called "Country" and another prompt called "City".  Note that your prompt and what you pass between the &lsS and the equal (=) must match exactly, otherwise OpenDocument will not communicate the prompt title to InfoView properly and InfoView will stop and execute the prompt to get the info it needs before running the report.  Have you tried what you've posted originally to see if it executes without a problem?
    Thanks,
    John

  • Get all values from multi select in a servlet

    Hello,
    I have a multi <select> element in a HTML form and I need to retrieve the values of ALL selected options of this <select> element in a servlet.
    HTML code snippet
    <select name="elName" id="elName" multiple="multiple">
    Servlet code snippet
    response.setContentType("text/html");
    PrintWriter out = null;
    out = response.getWriter();
    String output = "";
    String[] str = request.getParameterValues("elName");
    for(String s : str) {
    output += s + ":";
    output = output.substring(0, output.length()-1); // cut off last deliminator
    out.println(output);But even when selecting multiple options, the returned text only ever contains the value of the first selected option in the <select>
    What am I doing wrong? I'm fairly new to servlets
    Edited by: Irish_Fred on Feb 4, 2010 12:43 PM
    Edited by: Irish_Fred on Feb 4, 2010 12:44 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:14 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:26 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:26 PM
    Edited by: Irish_Fred on Feb 4, 2010 2:32 PM

    I am using AJAX.
    I will show you how I'm submitting the <select> values by showing you the flow of code:
    This is the HTML code for the <select> tag and the button that sends the form data:
    <form name="formMain" id="formMain" method="POST">
         <input type="button" id="addOpts" name="addOpts" value="Add Options" style="width:auto; visibility:hidden" onClick="jsObj.addOptions('servletName', document.getElementById('elName'))">
         <br>
         <select name="elName" id="elName" multiple="multiple" size="1" onChange="jsObj.checkSelected()">
              <option value="0"> - - - - - - - - - - - - - - - - </option>
         </select>
    </form>Note that the "visibility:hidden" part of the button style is set to "visible" when at least one option is selected
    Note that "jsObj" relates to a java script object that has been created when the web app starts ( The .js file is included in the .jsp <head> tag )
    The following code is taken from the file: "jsObj.js"
    jsObj = new jsObj();
    function jsObj() {
    //=================================================
         this.addOptions = function(url, elName) {
              var theForm = document.getElementById('formMain');          
              if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
                   xmlhttp=new XMLHttpRequest();
              } else { // code for IE6, IE5
                   xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
              url += this.buildQueryString(theForm.name);
              xmlhttp.open("POST",url,true);
              xmlhttp.send(null);
              xmlhttp.onreadystatechange=function() {
                   if(xmlhttp.readyState==4) { // 4 = The request is complete
                        alert(xmlhttp.responseText);
    //=================================================
    this.buildQueryString = function(formName) {
              var theForm = document.forms[formName];
              var qs = '';
              for (var i=0; i<theForm.elements.length; i++) {
                   if (theForm.elements.name!='') {
                        qs+=(qs=='')? '?' : '&';
                        qs+=theForm.elements[i].name+'='+escape(theForm.elements[i].value);
              return qs;
         //=================================================
    }And this is a code snippet from the "servletName" servlet:public synchronized void doGet(HttpServletRequest request,
              HttpServletResponse response) throws ServletException,IOException {
              PrintWriter out = null;
              try {
                   response.setContentType("text/html");
                   out = response.getWriter();
                   String output = "";
                   String[] values = request.getParameterValues("elName");
                   for(String s : values) {
                        output += s + ":";
                   output = output.substring(0, output.length()-1); // cut off last delimitor
                   out.println(output);
                   } catch (Exception e) {
         }So anyway, everthing compiles / works, except for the fact that I'm only getting back the first selected <option> in the 'elName' <select> tag whenever I select multiple options
    Edited by: Irish_Fred on Feb 7, 2010 10:53 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How do I pass multiple values from a text box to an update statement

    I hope this does not sound to lame. I am trying to update multiple values Like this:
    Code|| Computer Desc || Computer Price || Computer Name
    SEL1 || Apple macbook || 1564 || Apple Macbook Basic
    SEL2 || Dell 630 || 1470 || Dell Latitude
    I want to change all six values at once in one update statement based on the Code, I can't find a good tutorial/example to help me.
    Can anyone point me in the right direction?
    Thanks so much,
    Laura

    You can do conditional updates with decode or case statements e.g.
    SQL> create table t as
      2  select 'SEL1' as code, 'Apple macbook' as comp_desc, 1564 as comp_price, 'Apple Maxbook Basic' as comp_name from dual union
      3  select 'SEL2', 'Dell 630', 1470, 'Dell Latitude' from dual
      4  /
    Table created.
    SQL>
    SQL> update t
      2  set comp_desc = CASE code WHEN 'SEL1' THEN 'Test1' Else 'Test2' END,
      3      comp_price = CASE code WHEN 'SEL1' THEN 1234 Else 2345 END,
      4      comp_name = CASE code WHEN 'SEL1' THEN 'Test1 Name' Else 'Test2 Name' END
      5  /
    2 rows updated.
    SQL>
    SQL> select * from t
      2  /
    CODE COMP_DESC     COMP_PRICE COMP_NAME
    SEL1 Test1               1234 Test1 Name
    SEL2 Test2               2345 Test2 Name
    SQL>

  • Select multiple values in mult-select list

    I have the following query as the source for a multi-select page item:
    SELECT person.person_id
    FROM person, pers_proj_task
    WHERE pers_proj_task.person_id = person.person_id
    AND pers_proj_task.project_id = :P3_PROJECT_ID
    The query returns two records and the page item's session value is 4:3, but only the value 4 is highlighted in the mulit-select list. How can I get both values to be highlighted?

    Got it to work for a multi-select item by following Dimitri's post which uses a shuttle example. It was still only highlighting one value, but I tried Patrick Wolf's suggestion from the comments on Dimitri's post to put the pl/sql block in the source of the item rather than as a computation and it worked.
    So I now have a multi-select list which has default values pulled from a LOV. The items that are highlighted by default are selected by using the following pl/sql block in the "source/value or expression" of the :P3_PERSON_ID multi-select item:
    declare
    person_list apex_application_global.vc_arr2;
    i number := 1;
    begin
    for r in ( SELECT person.person_id
    FROM person, pers_proj_task
    WHERE pers_proj_task.person_id = person.person_id
    AND pers_proj_task.project_id = :P3_PROJECT_ID)
    loop
    person_list(i) := r.person_id;
    i := i + 1;
    end loop;
    return APEX_UTIL.TABLE_TO_STRING(person_list,':');
    end;
    Thanks to Amanda, ArtS, Dimitri and Patrick.
    Jeremy

  • How do I pass a value from a selected datagrid row to a popup

    I am working on a project tracking application in flex and need to pass the value of one of the rows from the datagrid to a popup. We have a screen with 2 data grids. The first datagrid lists the projects, their start, and end date and the project owner. The datagrid below the first datagrid lists the tasks for that specific project listed in the datagrid above. When you click on the project name above, the datagrid below is populated with the tasks. Within the tasks datagrid are start and end date boxes.
    What I need to do is be able to pass the project ID from the original datagrid into a popup that is called when a user changes the date of a project task. The popup is designed to submit a reason for why the user is changing the date on the task. In short, when they submit a reason, I need the project id passed from the datagrid into the popup so when submit is clicked, the proper row in the DB table is update via a CFC. Thank you.

    I tried that, but when I try to build the project, I get the error that there is a call to an undefined value. Here is code:
    Project Component:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
        width="100%" height="100%" creationComplete="init();" xmlns:mxml="components.mxml.*">
        <mx:Script>
            <![CDATA[
                import mx.events.ListEvent;
                import mx.controls.dataGridClasses.DataGridColumn;
                import mx.rpc.events.ResultEvent;
                import mx.managers.PopUpManager;
                import mx.core.IFlexDisplayObject;
                import components.mxml.NewProject;
                import components.mxml.NewTask;
                import components.mxml.dateChangeNotice;
                import mx.controls.Alert;
                private function init():void{
                    roGetData.getProjects();
                    //roGetData.getTasks();
                private function projectClick(event:ListEvent):void{
                    //Alert.show(dgProjects.selectedItem.projectID);
                    roGetData.getTasks(dgProjects.selectedItem.projectID);
                private function refreshProjects(event:MouseEvent):void{
                    roGetData.getProjects();
                private function ResultEvent_Projects(event:ResultEvent):void{
                    dgProjects.dataProvider = event.result;
                private function ResultEvent_Tasks(event:ResultEvent):void{
                    adgTasks.dataProvider = event.result;
                private function ResultEvent_UpdateTasks(event:ResultEvent):void{
                    Alert.show('Your task was updated');
                private function showNewProject():void{
                    var newProjectWindow:IFlexDisplayObject =
                        PopUpManager.createPopUp(this, NewProject, true);
                    newProjectWindow.addEventListener(MouseEvent.CLICK, refreshProjects);
                private function showNewTask():void{
                    var newTaskWindow:IFlexDisplayObject =
                        PopUpManager.createPopUp(this, NewTask, true);
                private function dateFormat(item:Object, column:DataGridColumn):String{
                    return dateFormatter.format(item[column.dataField]);
                    //Function calls the Reason popup window
                //private function changeReason():void{
                    //Create Popup Window
                    //var resultWindow:IFlexDisplayObject =
                    //PopUpManager.createPopUp(this, dateChangeNotice, false);
            ]]>
        </mx:Script>
        <mx:RemoteObject id="roGetData" destination="ColdFusion" source="projectTracker.components.cfc.controllers.getController">
            <mx:method name="getProjects" result="ResultEvent_Projects(event);" fault="Alert.show(event.fault.faultString);" />
            <mx:method name="getTasks" result="ResultEvent_Tasks(event);" fault="Alert.show(event.fault.faultString);" />
        </mx:RemoteObject>
        <!--<mx:RemoteObject id="roUpdateData" destination="ColdFusion" source="projectTracker.components.cfc.controllers.updateController">
            <mx:method name="updateTasks" result="ResultEvent_UpdateTasks(event);" fault="Alert.show(event.fault.faultString);" />
        </mx:RemoteObject>-->
        <mx:DateFormatter id="dateFormatter" />
        <mx:HBox width="100%">
            <mx:Label text="Projects:" />
            <mx:Button label="Insert New Project" click="showNewProject();"/>
        </mx:HBox>   
        <mx:Panel width="100%" height="45%" title="Projects">
            <mx:DataGrid id="dgProjects" width="100%" height="100%" itemClick="projectClick(event);" dataProvider="">
                <mx:columns>
                   <mx:DataGridColumn dataField="projectID" headerText="ProjectID" visible="false" />- I Need to pass this value
                    <mx:DataGridColumn dataField="name" headerText="Project" />
                    <mx:DataGridColumn dataField="startDate" headerText="Date Started" labelFunction="dateFormat" />
                    <mx:DataGridColumn dataField="endDate" headerText="Completion Date" labelFunction="dateFormat" />
                    <mx:DataGridColumn dataField="description" headerText="Description" />
                    <mx:DataGridColumn dataField="statusName" headerText="Status" />
                    <mx:DataGridColumn dataField="ownerName" headerText="Owner" />
                </mx:columns>
            </mx:DataGrid>
        </mx:Panel>
        <mx:Panel width="100%" height="45%" title="Project Tasks">
            <mx:AdvancedDataGrid id="adgTasks" width="95%" height="100%" variableRowHeight="true">
                <mx:columns>
                    <mx:AdvancedDataGridColumn dataField="taskID" visible="false" width="50" />
                    <mx:AdvancedDataGridColumn dataField="name" width="25" />
                    <!--<mx:AdvancedDataGridColumn dataField="startDate" headerText="Date Started" />
                    <mx:AdvancedDataGridColumn dataField="endDate" headerText="Completion Date" />-->
                    <mx:AdvancedDataGridColumn id="descript" dataField="description" headerText="Description" width="50"/>
                    <mx:AdvancedDataGridColumn dataField="ownerID" headerText="Owner" width="25"  />
                    <mx:AdvancedDataGridColumn dataField="notes" headerText="Project Notes" width="50"/>
                    <mx:AdvancedDataGridColumn dataField="Dates" headerText="Dates" width="50"/>
                </mx:columns>
                <mx:rendererProviders>
                    <mx:AdvancedDataGridRendererProvider dataField="taskID" columnIndex="5">
                        <mx:renderer>
                            <mx:Component>
                                <mxml:dgDateHSlider startDate="{data.startDate}" endDate="{data.endDate}"/>   
                            </mx:Component>
                        </mx:renderer>
                    </mx:AdvancedDataGridRendererProvider>
                </mx:rendererProviders>
            </mx:AdvancedDataGrid>   
        </mx:Panel>
        <mx:HBox width="100%">
            <mx:Label text="Tasks:" />
            <mx:Button label="Insert New Task" click="showNewTask();"/>
            <mx:Spacer width="200"/>
        </mx:HBox>
    </mx:VBox>
    Popup Components
    <?xml version="1.0" encoding="utf-8"?>
    <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="400" title="Reason for Date Change" backgroundColor="#E5E4E4">
    <mx:Script>
        <![CDATA[
                 import mx.events.ValidationResultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.managers.PopUpManager;
                import mx.core.IFlexDisplayObject;
                import components.mxml.NewUser;
                import mx.controls.Alert;
                import components.mxml.Projects;
                import components.mxml.NewTask;
            //Clear Text Area Function
           public function Clear():void{
                reasonText.text = "";
            //function to send notes to db via RO
            public function writeNotes():void{
      into here-->    updateReason.reasonUpdate(taskID.selectedItem,reasonText.text);  taskID.selectedItem is not recognized. It errors on compile
            //remote object Results Event
            public function reasonResult(event:ResultEvent):void{
                Alert.show("Label update successful, thank you!");
                Clear();
        ]]>
    </mx:Script>
    <!--Update Remote Object-->
    <mx:RemoteObject id="updateReason" destination="ColdFusion" source="projectTracker.components.cfc.controllers.createController">
        <mx:method name="reasonUpdate" result="reasonResult(event);" fault="Alert.show(event.fault.faultString);"/>
    </mx:RemoteObject>
    <!--Reason Text Area-->
        <mx:TextArea x="19" y="60" width="90%" height="246" maxChars="1000" wordWrap="true" enabled="true" id="reasonText"/>
        <mx:Button label="Update" click="writeNotes()" right="65" bottom="0"/>
        <mx:Button label="Exit" click="PopUpManager.removePopUp(this);" right="10" bottom="0"/>
        <mx:Text text="Please Specify your reason for changing the dates of this task." width="90%" fontWeight="bold" top="10" horizontalCenter="0"/>
    </mx:TitleWindow>

  • Method to pass multiple values from jsp

    Hi All,
    There are multiple rows in the jsp form with each having a unique id.
    I want to update some fields in all the rows. Then pass all the data to the controller. From the controller all the data should go to the database one row at a time .How do i do this........
    Any help would be appreciated
    Thanks

    You can make use of ArrayList
    In CO
    OAApplicationModlue am = pageContext.getApplicationModule(webBean);
    ArrayList values = (ArrayList) am.invokeMethod("PassArray");In AM
    public ArrayList PassArray
    ArrayList values = new ArrayList();
    values.add("value")
    values.trimToSize();
    return values;
    }Thanks
    AJ

  • Extracting values from multi select check boxes delimeted by ":"

    A set of check boxes in an Apex form produces "V1:V2:V3" in the target field, these are the key fields from a dynamic selection lists based on a table that contains the key and value fields. Does anyone have a sample SQL fragment that will produce a record for each one of the values ?
    FORM_TABLE
    ID (1)
    CB_TARGET (V1:V2:V4)
    LIST_TABLE
    KEY_F (V1),(V2),(V3),(V4) etc.
    VALUE_F (Value 1), (Value 2), (Value 3), (Value 4 ...)
    Even though there is only a single row in this example in the "FORM_TABLE", how can this be transformed to :
    1, V1
    1, V2
    1, V4
    Regards
    H

    Does anyone have a sample SQL fragment that will produce a record for each one of the values ?Does it have to be SQL? The simplest approach is probably PL/SQL, using the <tt>apex_util.string_to_table</tt> function.
    For a purely SQL-based solution, use whatever string-to-row technique is appropriate to your situation.

  • Passing Multiple values from jsp to servlet

    Dear all,
    I am trying to do a very simple thing. I need to pass names of all products that have been added to the cart.
    Below is my jsp. Basically I am trying to make something very basic using ajax, and later actually build it.
    heres my code with 2 questions... all I need to do is to pass the names of the products.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <TITLE>ShowCart.jsp</TITLE>
    </HEAD>
    <script>
    xhr = null
    var flag = false;
    var amount = 0;
    function getData(url,divid,prodName){
              var as = "added"+divid // this is the divid
              if (document.getElementById(as)!=null)
                   document.getElementById(as).innerHTML ="adding"
           if (window.XMLHttpRequest){
             xhr=new XMLHttpRequest()
           else if (window.ActiveXObject){
             xhr=new ActiveXObject("Microsoft.XMLHTTP")
           if (xhr){
              xhr.onreadystatechange=callback       
             xhr.open("GET",url,true)
             xhr.send(null)
             setDivid(as);
             updateCart(divid,prodName);
           else{
             alert("XMLHTTP not supported")
    function setDivid(as){
    if(flag){
         document.getElementById(as     ).style.backgroundColor = "RED";
            document.getElementById(as).innerHTML = "item added";
    function updateCart(divid,prodName){
    amount += divid;
    document.getElementById("amount").innerHTML = "price is "+amount;
    udpateSubmitData(prodName);
    function updateSubmitData(prodName){
    var = document.getElementById("Hidden"+prodName).value;
    //do I need to do something here to submit the data ? ------------------1
    function callback(dd){
           // when finished
           if (xhr.readyState==4){
                  //  OK
                  if (xhr.status==200){
                 // process the result.
                  flag = true;
           else{
                  alert("error")
    </script>
    <BODY>
    <P>Place content here.</P>
    The products are :
    <%
    if(request.getAttribute("Products")!= null){
    java.util.ArrayList list = new java.util.ArrayList();
    list = (java.util.ArrayList)request.getAttribute("Products");
    for(int i=0; i<list.size(); i++){
    com.deere.sc.bean.ProductBean pb1 = new com.deere.sc.bean.ProductBean();
    pb1 = (com.deere.sc.bean.ProductBean)list.get(i);;
    %>
    <table>
    <td>
    <% out.println(pb1.getProductName());
         out.println(pb1.getProductPrice());
         %> <td> <div id="added<%= i %>"> </div> </td>
    <td>     <a href = "javaScript:getData('/SC/AddToCart?name=<%= pb1.getProductName() %>',<%= i %>,<%= pb1.getProductName() %>);"> add to cart</a>  </td>
         <input type="hidden" id="Hidden<%= pb1.getProductName() %>" value ="<%= pb1.getProductName() %>">
         </td>
         <%
    }//end for
    }//end if
    %>
    </table>
    Thank you for shopping at the looters .. heh ;)
    Total amount of money in your cart is <div id ="amount"> </div>
         <a href = "/SC/CheckOut">Check out cart</a>
    <!-- OR may be just add Hidden tags here ?  ______________________2 -->
    </BODY>
    </HTML>Any help on tips for proceeding from here will be helpful.
    thanks in advance

    Dear all,
    I am trying to do a very simple thing. I need to pass names of all products that have been added to the cart.
    Below is my jsp. Basically I am trying to make something very basic using ajax, and later actually build it.
    heres my code with 2 questions... all I need to do is to pass the names of the products.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <HTML>
    <HEAD>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <TITLE>ShowCart.jsp</TITLE>
    </HEAD>
    <script>
    xhr = null
    var flag = false;
    var amount = 0;
    function getData(url,divid,prodName){
              var as = "added"+divid // this is the divid
              if (document.getElementById(as)!=null)
                   document.getElementById(as).innerHTML ="adding"
           if (window.XMLHttpRequest){
             xhr=new XMLHttpRequest()
           else if (window.ActiveXObject){
             xhr=new ActiveXObject("Microsoft.XMLHTTP")
           if (xhr){
              xhr.onreadystatechange=callback       
             xhr.open("GET",url,true)
             xhr.send(null)
             setDivid(as);
             updateCart(divid,prodName);
           else{
             alert("XMLHTTP not supported")
    function setDivid(as){
    if(flag){
         document.getElementById(as     ).style.backgroundColor = "RED";
            document.getElementById(as).innerHTML = "item added";
    function updateCart(divid,prodName){
    amount += divid;
    document.getElementById("amount").innerHTML = "price is "+amount;
    udpateSubmitData(prodName);
    function updateSubmitData(prodName){
    var = document.getElementById("Hidden"+prodName).value;
    //do I need to do something here to submit the data ? ------------------1
    function callback(dd){
           // when finished
           if (xhr.readyState==4){
                  //  OK
                  if (xhr.status==200){
                 // process the result.
                  flag = true;
           else{
                  alert("error")
    </script>
    <BODY>
    <P>Place content here.</P>
    The products are :
    <%
    if(request.getAttribute("Products")!= null){
    java.util.ArrayList list = new java.util.ArrayList();
    list = (java.util.ArrayList)request.getAttribute("Products");
    for(int i=0; i<list.size(); i++){
    com.deere.sc.bean.ProductBean pb1 = new com.deere.sc.bean.ProductBean();
    pb1 = (com.deere.sc.bean.ProductBean)list.get(i);;
    %>
    <table>
    <td>
    <% out.println(pb1.getProductName());
         out.println(pb1.getProductPrice());
         %> <td> <div id="added<%= i %>"> </div> </td>
    <td>     <a href = "javaScript:getData('/SC/AddToCart?name=<%= pb1.getProductName() %>',<%= i %>,<%= pb1.getProductName() %>);"> add to cart</a>  </td>
         <input type="hidden" id="Hidden<%= pb1.getProductName() %>" value ="<%= pb1.getProductName() %>">
         </td>
         <%
    }//end for
    }//end if
    %>
    </table>
    Thank you for shopping at the looters .. heh ;)
    Total amount of money in your cart is <div id ="amount"> </div>
         <a href = "/SC/CheckOut">Check out cart</a>
    <!-- OR may be just add Hidden tags here ?  ______________________2 -->
    </BODY>
    </HTML>Any help on tips for proceeding from here will be helpful.
    thanks in advance

  • Passing the values from one selection screen to another report

    Hi all,
    This is my requirement...
    I need to hav a selection screen with various input parameter along with 3 radio buttons...
    If i enter the values and select say first radiobutton the corresponding called program needs to be executed .
    NOTE :
    1)The called program selection screen needs to be skipped
    2) the values entered in the calling program needs to be passed to the called program and the output of the called program needs to be displayed.
    3)the selection screen is the same for both calling and called program
    Can anyone plz help in this regard?
    Regards,
    Gowri Shankar

    Hi...
    Use the statement
    <b>SUBMIT zps_called_report WITH SELECTION-TABLE seltab.</b>
    see the following link....
    <b>http://help.sap.com/saphelp_nw04s/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm</b>
    Hope it helps you...
    Let me know if u have any more doubt...
    Reward points if useful......
    Suresh.......

  • Passing multiple values to a parmeters in Discoverer 4i

    Hi Friends,
    I have a requirement of passing multiple values (Operating Unit Names) to the parameter(P_Opr_Unit) in Discoverer.
    I am using PL/SQL function to get the data in Discoverer.Function is working fine for multiple values from Database(SQL Developer).
    When i am trying to pass multiple values from discoverer ...it is accepting only the first parameter value of Operating Unit.
    Need your Expertise on this issue.
    Thanks In Advance.
    Thanks & Regards
    Ramya Nomula

    Hi,
    You can only pass one parameter value into a function. When you have a multi-valued parameter it enables you to create the condition: item IN (:param) which Discoverer expands to the condition: item IN ('val1', 'val2', 'val3') where these are the values the user has picked from the list of values.
    Now if you have a calculation containing a function and a parameter: my_func(:param) then Discoverer has to map the parameter in the function an item in the worksheet. So if the param is from a multi-valued list it can only pass one value and so expands the calculation to my_func('val1') where val1 is the first item picked from the list.
    Rod West

Maybe you are looking for