Select list display value in javascript function

Hi All,
I have a select list in a tabular form having a display value & return value.
I am using $x(var_name).value or $v(var_name) for retreving return value of the select list in a javascript function.
Can anyone let me know how can I get the display value of the select list in a javascript function? Im using Apex 3.2
Thanks & Regards,
Sandeep

What if the select list is not an item. Select list I am talking about is in a tabular form.Regardless of how they're generated in APEX, in JavaScript they're all DOM nodes. There are many ways of accessing the node of the required element. Consider the Items for Order... tabular form on page 29 of the Sample Application:
var productNameLOV = document.wwv_flow.f04[0] // select list containing name of product on first order line
var productNameLOV = $x("f04_0001") // another way of accessing the same node, using the ID attribute generated by apex_itemWe can see this using the Safari console:
=> productNameLOV = document.wwv_flow.f04[0]
    <select name="f04" id="f04_0001" autocomplete="off">…</select>
=> productNameLOV = $x("f04_0001")
    <select name="f04" id="f04_0001" autocomplete="off">…</select>Once you've got the node&mdash;however you get it&mdash;you then use the methods shown above:
=> i = productNameLOV.selectedIndex
    3
=> productNameLOV.options.text
"Business Shirt [$50]"
So it appears you would use:var item = document.wwv_flow.f01[i];
var selected = item.selectedIndex;
var selectedOption = item.options[selected].text;
This is meaningless:...
var my_var = document.wwv_flow.f01[i].id; // f01 is tabular column of select list
if ($x(my_var) == 'display_value') //$x(my_var) is having return value, but i need display_value there
<tt>$x(my_var)</tt> returns a DOM node object, whilst <tt>'display_value'</tt> is a string: they are not comparable.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Select List Display Value

    Hello All,
    Does anyone know how to make a Select List ReadOnly and display the Display Value not the Return Value when modifying the data? I have made the Select List a Text Field, Text Area, etc.. but then the Return Value is diplayed and not the Display Value. I do not want my end-users to modify the Item but I do want to show them the Display Value. Any ideas and help is appreciated, thanks.

    Hi,
    I kept getting the [] no matter what I did.
    Just realised, though, that the styling would hide valid values as well. D'oh!
    I've been testing something here: [http://apex.oracle.com/pls/otn/f?p=33642:9] Click on a link for an employee on the right to see the data on the left - try ones with and without an entry in the MGR column.
    Originally, P9_MGR was a normal select list, but I have now set it to "Hidden and Protected" and immediately followed it with a new "Display as Text (does not save state") item called P9_MGR_DISPLAY.
    The source of this new item is a SQL query of:
    SELECT NVL(MIN(ENAME),'Unselected')
    FROM EMP
    WHERE EMPNO = :P9_MGRThis will either return an ENAME value if one exists for P9_MGR or 'Unselected'
    Andy

  • Select list return value displayed in another item

    The subject pretty much defines it. I have 3 items on a page select list, displays as text (based on LOV), and a text box. My idea is to display a control number in the select list. When the user selects the number that they want I would like the return value to fill in the displayed as text item. Then user can then use the text box to update that information.
    My question is how do I get the return value to display on the users selection?
    Thanks,
    Derek

    Try to compute that item.
    Denes Kubicek

  • Multiple-Selection List Box Values in Multiple Columns

    I am using InfoPath 2010 with SharePoint 2013. I have a form with a multiple-selection list box which has A LOT of choices. Instead of displaying all the choices in one column, is it possible to display the values of my list box in several
    columns? 

    Hi Andrea,
    I agree with Brij, one multiple-selection list box is associated with one list field, we cannot use the one multiple selection list box value for other multiple selection list boxes, we need to create multiple choices for each multiple-selection list box
    control in InfoPath form.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Can we set h:outputText value= "(some javascript function value)"/

    Hi
    Can we set <h:outputText value= "(some javascript function value)"/>
    In a scenario like when user changes the item in dropdown box. label name as to change for the next text box.
    -----JSP page------
    h:outputText value="*" styleClass="mandatoryField" />
    <h:outputText value="Matching Criteria:" />
    <h:selectOneMenu id="MatchingCriteria" styleClass="dropDownMenu" value="#{OffsetTradingRuleBean.matchingCriteria}"immediate="true" onchange="unitChange()">
    <f:selectItems value="#{OffsetTradingRuleBean.matchingCriteriaMap}"/>
    </h:selectOneMenu>
    <h:outputText value=""></h:outputText>
    <h:outputText value=""></h:outputText>      
    <h:outputText id="DeminimisLabel" value="" ></h:outputText>
    <h:inputText id="DeMinimisUnit" styleClass="text" value="#{OffsetTradingRuleBean.deMinimisUnit}" maxlength="15" onchange="detectChange()" >
    <f:validator validatorId="DefaultValidator"/>          
    </h:inputText>
    <h:outputText value=""></h:outputText>
    -----Java Script-----
    function unitChange(){
         if(document.getElementById("frm:MatchingCriteria").value!="1"){
         alert('inside unitchange--'+document.getElementById("frm:MatchingCriteria").value)
              document.getElementById("frm:DeminimisLabel").value="Deminimis Dollars";
         if(document.getElementById("frm:MatchingCriteria").value!="0"){
              document.getElementById("frm:DeminimisLabel").value="Deminimis Shares";
    thanks in advance
    Rambhapuri

    balu
    actually i want to swap label name using javascript. first i will call onchange event from matching criteria dropdown box . then it will fire unitChange() function.
    then i am putting value Deminimis dollor or deminimis shares accroiding to the value which is there in dropdown.
    this value as to come in <h:outputText id="deminimisLabel" value=" should come value from java script" />
    and it should act dynamically ,. like when ever user changes the dropdown item . the corresponding name should change in lable name.
    thanks
    rambhapuri

  • Select list: Display the selected value using JSP

    Hi
    I have a select list with a set of values and when I select a value from the list I want the selected text to appear on the screeen. How do I display the selected value?
    Please help:
    Here is the code for the list:
    <select name="arraySelect" size="8" onclick="">
    <%for (int i = 0; i < dumpArray.length; i++) {
    if( i == 3){
    %>
    <option value="<%=dumpArray%>" selected><%=dumpArray[i]%></option>
    <% i++;} else %>
    <option value="<%=i%>"><%=dumpArray[i]%></option><p>
    <% } %>
    </select>
    <% String name;
    name = request.getParameter("arraySelect");
    out.println(name);
    I tried request parameter but it did not help. How can I do it?

    did you submit your page?

  • Dynamic Select List Allowed Values

    Howdy Folks,
    I am trying to allow end users to select their username. The usernames are generated from a rule library, and displayed in a select form element. I am doing this by having the allowedValues call the rule that generates the possible names directly. The rule returns a list of valid names. The problem I am currently having, is that if the page reloads or refreshes, then the allowedValues calls the rule again. Some of the username choices involve random numbers, so it is possible (and very likely), that separate calls to the rule will generate different potential values. So what is now happening, is that when a user selects the value, the page reloads, and the end user sees an error that looks like this:
    ( ) - Warning: Selected value for field 'Select a Valid User Name' does not match any of the allowed values.
    The reason I am reloading the page, is that I am also trying to show the user what their email address will look like with the new value. So I have a different form element that is loading is value dynamically, and referencing the select form element. This mostly works, but the warning above is unacceptable.
    Is there a way I can load the dynamically created list only once, the first time the form is viewed, and not load it again every time the page refreshes?
    Another thing I tried to do (but didn't have luck with, so I sorta gave up on it) was to use the onChange of the select to change the value of email display field. This way the page never reloads and I don't have to deal with that issue. I'm thinking the onChange might actually work, but I would need to execute javascript or something, and not just use an express <set/> command to set the value of the field name that displays the email text.
    Does anyone have advice on how to make the values only load once? Or how to change the value on the onChange event?
    Thanks!
    Jim

    Mike,
    Thanks for the feedback. I actually did try that eventually. I created a variable in the form, and initialized that variable to the list of possible values. Then I referenced the variable in the 'allowedValues' of the select form item. At that point in time I still had the select box set as an action, so it would reload the page, hoping to reload the value in the email display field. This still did not work. Each time the action fired off, the variable was re-initializing itself. I eventually tried to put in a check, so it would not re-initialize itself if it had already been initialized. That caused a syslog error.
    I ended up solving the problem using javascript. I changed the field that reported the potential email address to an html element. Then for the html attribute I made a div with an ID. I then set a line of javascript into the onChange attribute of the select form element. This worked when ever the select form value changed. I then added the same line of javascript to the onLoad attribute of the jsp pages body element. This worked for loading the page.
    This solved the problem of the page reloading and the select getting new values. That still happens if you actually reload the page, but all the form elements work without the reload now.
    Thanks!
    Jim

  • Dynamic select list display details on same page

    i have a select dropdown list that is showing products from a php msql database. When one of the products is selected from the list in need the details of that product displayed underneath the select list.
    here is what i have so far
    mysql_select_db($database_beau, $beau);
    $query_Recordset1 = "SELECT * FROM beaProdSizes, beauCat WHERE beaProdSizes.CatID = beauCat.catID";
    $Recordset1 = mysql_query($query_Recordset1, $beau) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <select id="selectName" name="name">
                          <option value="Select Design">Select Design</option>
                          <?php
    do {
    ?>
                          <option value="<?php echo $row_Recordset1['name']; ?>"><?php echo $row_Recordset1['name']; ?></option>
                          <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
                $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
                          </select>
    thanks in advance

    ok i want to make it using the php that you gave me, i have tried it but it doesnt seem to be working
    this is what i have:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $var1_Recordset1 = "-1";
    if (isset($_GET['CatID'])) {
      $var1_Recordset1 = $_GET['CatID'];
    mysql_select_db($database_beau, $beau);
    $query_Recordset1 = "SELECT * FROM beaProdSizes, beauCat WHERE beaProdSizes.CatID = beauCat.catID";
    if (isset($_GET['catID']) && is_numeric($_GET['catID'])) {
        $query_Recordset1 .= ' AND beauCat.catID = ' . $_GET['catID'];
    $Recordset1 = mysql_query($query_Recordset1, $beau) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <div class="header" id="beauTitleBOX"><?php echo $row_Recordset1['catname']; ?></div>
            <div id="beauSelectBOX">
              <form id="FormName" action="" method="get" name="FormName">
                <select id="selectName" name="name">
                  <option value="Select Design">Select Design</option>
                  <?php
    do {
    ?>
                  <option value="<?php echo $row_Recordset1['catID']; ?>"><?php echo $row_Recordset1['name']; ?></option>
                  <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
                $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
                </select>
                <input type="submit" name="button" id="button" value="select" />
              </form>
            </div>
            <div class="header" id="beauPrice"><?php echo $row_Recordset1['price']; ?></div>
            <div class="text" id="beauOtherContent"><?php echo $row_Recordset1['desc']; ?></div>

  • Select List multiple values

    All,
    I am in urgent need of this requirement referencing/copying all selected multiple values in select List and putting them into text item/text-area separated by ","/comma delimiter.....any help
    appreciated.
    example:
    select list
    =======
    aaaa
    bbbb (selected)
    cccc
    dddd(selected)
    ffffff
    copied is:
    bbbb, dddd

    No worries, I've found a way.
    You need to create a pl-sql function that generates the necessary HTML code that will render the select list using the selected="selected" attribute when the option value is selected.
    This is an example of the expected HTML code for a multiple selection list:
    <select name="favoritefood" id="favoritefood" multiple=true; size=4;>
    <option value=1>Cheese</option>
    <option value=2 selected="selected">Egg</option>
    <option value=3>Cabbage</option>
    <option value=4 selected="selected">Ham</option>
    </select>
    I created this function in order to find the matches within the saved code and the option value. And then include the selected="selected" string in the returned HTML code.
    Finally, I'm using this function in the SQL query that generates a tabular report and I changed the column Display Attribute to "Standard Report Column". Then the report instead of showing the HTML code, will render it to a HTML item.
    Regards
    Edited by: user9982480 on Jul 30, 2012 8:32 AM
    Edited by: user9982480 on Jul 30, 2012 8:33 AM
    Edited by: user9982480 on Jul 30, 2012 8:34 AM

  • Pass bound value to Javascript function

    I'm working in JDeveloper 10.1.2. I'm working on an application generating JSPs for the UI. I display an HTML table using a databound control from the data control pallette. The last column in the table is a button for each row. The user should be able to click a row's button and have a popup window display a page showing a table of detailed info on the the record in the html table row selected.
    Basically I want to pass the id/key for the row to a javascript function using the onclick event of the button. Here is my first attempt:
    <input type="button" onclick="popupDetail(<c:out value="${Row['AuditSeqid']}"/>)"/>
    The compiler barfed on the c:out tag. I don't know if it would even perform the subsitution correctly. The compiler seems to think the double quote starting the value attribute is ending the onclick event descriptor. Escaping with \" just brought up different errors.
    Can anyone recommend a way to pass a bound column's value from a rowset into a javascript function as a parameter?
    Thanks for any help you can give. I'm totally new to JDeveloper. This would be easy in simple JSPs, but with the Oracle data binding, I don't know what tags/objects are available from which I can grab the value.

    Found the solution:
    <td>
    <input type="button" name="detailsButton" value="Details" onClick="javascript:popupDetail('<c:out value="${Row['AuditSeqid']}" />');"/>
    </td>

  • Multiple Select List looping thru PL/SQL function body returning SQL query

    Hi,
    I have a Multiple Select List. I want to loop through the values from the Select List and process them in a PL/SQL function body returning a SQL query. Currently, my code only returns the SQL SELECT results of one item in the select list. How do I change my code to make it return the results of all of the items in the select list? (I tested it and it is definitely picking up all the values in the select list).
    <b>
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s   VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
      FOR i in 1..selected_items.count LOOP
      s := TO_CHAR(selected_items(i));
    -- htp.p('First: '||s);
    -- htp.p('Second: '||:s);
    -- htp.p('Third: '||TO_CHAR(selected_items(i)));
      q:= 'SELECT  '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
      RETURN q;
      END LOOP;
    END;</b>
    Thank you,
    Laura

    Laura,
    First, I would be careful of introducing SQL Injection possibilities. Any time I see
    'Select ... ' || :P123_FOO || ' ... '
    I worry about sql injection. In your case you are converting :P50_SELECTED_INSTRUMENTS into selected_items and then selected_items into s. So when I see
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    I think, "I could use sql Injection and hack this."
    So, I would do some validation on :P50_SELECTED_INSTRUMENTS or some other method to avoid this.
    I'm not certain I understand your query. Do you really intend to allow the user to select the beginning of a string and then find all rows that start with that string? Or, do you just want to let them find when it matches the string. This is one way if you want to do matching:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(32767);
    q varchar2(32767);
    BEGIN
    -- Change the : separate string to be comma separated with quoted strings
    s := '''' || replace(:P50_SELECTED_INSTRUMENTS, ',', ''',''')|| '''' ;
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) in (' || s ||' ) '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    If you want to do something more like you originally stated, try this:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE 1=1 ';
    FOR i in 1..selected_items.count LOOP
    s := TO_CHAR(selected_items(i));
    q := q || ' and TO_CHAR(orig_geo_loc_sys) LIKE '''|| s ||'%'' ' ;
    END LOOP;
    q := q || ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    Hope this helps...
    Anton

  • How-To populate SELECT LIST default value from SQL Query

    OK, I've done my homework, and did not find my answer in the Forum, so here it is.
    I have a Page that displays fields from a SQL Query. The Page also has below that radiogroups, checkboxes, and Select Lists to allow the user to change values in the fields that are displayed at the top of the Region. I am able to pre-populate the radiogroups and checkboxes by performing a SELECT in the 'Source value or expression' of the Source area of the Page Item.
    However, I am unable to do the same for the Select List fields. Their default value ends up being the first value in the LOV ('-- None --' for NULL values). Source Used: Only when current value in session state is null. Source Type: SQL Query. Also, when I first go into the Page when running it, and check the Session State values, they are all null, so I don't understand why the field is not populated by the SQL Query statement as the radiogroups and checkboxes are.
    Any suggestions??? I've tried all sorts of combinations.

    Thank you for the suggestion.
    I had considered that, but cannot do so, because we are using Oracle Application Express more for development than for data containment.
    We have all our data in an Oracle 10.g DB which is separate from the OAEX server, and the OAEX app will reference that data via VIEWs and DB LINKs. We are doing so primarily as an added data security layer, where the data is housed separate from the app, in case the Web site is ever compromised. The data that can be viewed is restricted to a subset of the actual data that is available.
    Since the data is on a separate server, (I assume) we will not be able to set the source type to Database column, because (I asume) that is dependent upon the data being housed by the OAEX server.
    That still leaves me with having to populate the field with a SELECT statement from the Oracle DB. This unfortuneately is almost a show-stopper for me because of down-stream processing data requirements. Have not been able to come up with contingencies yet.

  • Passing list of values to a function

    As what type list of values multiple selections, e.g. resulting in (1,2,3), are represented in function parameters?
    for example i have lov that results in (1,2,3) and dataset query is select myfunction(:mylov) from dual.
    Variable of what type I must declare in function definition?

    when i hadthe same situation , i used cursor query to resolve .
    eg.
    select myfunction(cursor(select field1 from table1 where field1=:parameter1)) from dual
    In the PL sql function get all thee parameters from the cursor variable and pass into the looping statement for furthur processing

  • Select list null value issue - for filtering the tabular form report

    hello,
    I have a tabular form created on emp table and in the table their are entries for the employees who don't have a location, like it is null for some of the employees.
    Now I have created a select list item - for filtering the results based on location.
    my select query for select list item is
    select distinct location_name d,location_id r from emp order by 1
    -- so my select list contains all the distinct location_name including the null on my tabular form.
    so based on the selelcted value(in the select list), I am able to filter the results in my tabular form.
    but the thing is that when i try to select an null value from my select list - i am not able to filter my report - like its displaying all the records, its not filtering.
    can anyone help me out with this.
    thanks.

    Hi
    Try below select for LOV
    select distinct nvl(location_name,'No Location') d,nvl(location_name,'No Location') r from emp order by 1 And then change tabular from select where clause also use nvl(location_name,'No Location') like
    SELECT *
    FROM emp
    WHERE nvl(location_name,'No Location') = :Px_YOUR_ITEMBr, Jari

  • Select list -null value?

    When you create a select list on a column, and run the page for the first time, the drop down doesn't show any value. I realized that once you click on the drop down to see what the values are, at the bottom of the list there is a blank value. But you can only see this the first time you load the page. Once you click on any other value, that blank value is gone. How does this work? How can I select the blank value even after you had selected other values previously?
    Thanks,

    Modify the Item Definition's List of Values options (Edit Page Item->LOV)
    Display Null: Yes
    Null Display Value:  

Maybe you are looking for