Dynamic select list with displaying a description

Hi,
I want to have a select List, my list refer to a lov, and the lov refer to a table contaning 2 columns : code and description,
The list must display only the code, but I want having an item beside the list dispaling the description....
I have used a select list with the query :
select code d, code r from prog_theme order by 1 desc
and Now : what is the way for displaying the description
Thanks!!
Lila

Ok, here goes the top down approach...
In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
<div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
<div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
The actual javascript function that is contained in the 108.js file is:
function showHideDiv(objThis, inBool){
     var divid = "div" + objThis.id.substring(3);
     if (inBool) {
     ShowDiv(divid);
     else {
HideDiv(divid);
That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
function ShowDiv(divid){
     eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
function HideDiv(divid){
     eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
Hope this helps.

Similar Messages

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Dynamic select list with one static 'not_listed" option

    Hi guys,
    I want to create a dynamic select list with one static 'not_listed' option.
    One possible alternative is to add the 'not_listed' record into database, but I really dont want to go that way unless there is no other way around.
    Can anyone shed some lights on this?
    Many thanks,
    William

    As usual : "It depends"...
    If you have a foreign key defined on that field, Scott's reply won't work - unless you define '0 - Not listed' in the database. You can use selec 'not listed' d, to_number(null) r from dual though...
    Another - more declarative way - is in the on 'Edit Page Item' page, in the 'List of Values' region set 'Display Null' to 'Yes' and 'Null Display Value' to ' - Not listed - '.
    Roel

  • Dynamic Select List not displaying correct value

    Hi there!
    I have a page with a dynamic repeat region.
    As I press one record I get up all the details based on id on an edit page.
    The problem is that the info that is inserted via a Select List is not displaying correct on edit page.
    All the other values are correct, also the values in the repeat region on index page,
    but the value from the Select List on edit page is just displaying the initially selected item.
    Have tried using SELECT DISTINCT in the SQL statement, but no luck.
    Any other ideas?
    Cut and paste from form:
    <select name="Vegtype" class="ProvDet" id="Vegtype" title="<%=(rsAs.Fields.Item("VegType").Value)%>">
                        <option value="Ev" selected="selected">Ev</option>
                        <option value="Fv">Fv</option>
                        <option value="Rv">Rv</option>
                        <option value="Kv">Kv</option>
                      </select>
    Recordset
    <%
    Dim rsAs
    Dim rsAs_cmd
    Dim rsAs_numRows
    Set rsAs_cmd = Server.CreateObject ("ADODB.Command")
    rsAs_cmd.ActiveConnection = MM_LabCon_STRING
    rsAs_cmd.CommandText = "SELECT DISTINCT DatoM, DatoR, DatoU, Distr, FagFelt, Felt, IntNr, Km, KontrNr, Kontrollor, Masse, MasseBK, Punkt, Resept, TestID, UserID, VegHp, VegNavn, VegNr, VegType FROM tblTest WHERE TestID = ?"
    rsAs_cmd.Prepared = true
    rsAs_cmd.Parameters.Append rsAs_cmd.CreateParameter("param1", 5, 1, -1, rsAs__MMColParam) ' adDouble
    Set rsAs = rsAs_cmd.Execute
    rsAs_numRows = 0
    %>
    Regards,
    Christian
    DWCS5 | .Asp | MS Access

    Ok, here goes the top down approach...
    In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
    Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
    <div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
    <div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
    Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
    The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
    This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
    The actual javascript function that is contained in the 108.js file is:
    function showHideDiv(objThis, inBool){
         var divid = "div" + objThis.id.substring(3);
         if (inBool) {
         ShowDiv(divid);
         else {
    HideDiv(divid);
    That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
    function ShowDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
    function HideDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
    Hope this helps.

  • How to make dynamic select list with time interval of 15 minutes

    Dear all,
    I've a question. I need a select list that contains time with intervals of 15 minutes from 08:00 till 16:00.
    example 8:00
    8:15
    8:30
    8:45
    9:00
    9:15
    and so on till 16:00
    The values or stored in a varchar column.
    Can someone please help me with this one?
    Best regards,
    Caroline

    I think the easiest way would be to create a table "INTERVALS" with one row and column "INT_PERIOD"? per 15 minute period description
    8:00
    8:15
    16:00
    Then create your select list item based on a Dynamic List, or Query as
    SELECT int_period d, int_period r
    FROM INTERVALS
    ORDER BY INT_PERIODYou could write something to load the table, but that might take about as long to just edit in the values.
    Making it a Dynamic LOV, you then have it available anywhere else you might need it.
    Edited by: Bob37 on May 4, 2012 8:57 AM

  • Dynamic select list with more than one value?

    I am creating a simple CRUD component for our company's Joomla site. This component allows our users to create discount bundles for our cart according to shopper group and products.  I've been using Dreamweaver to author the administrator forms and have run into a bit of a problem.  All of my forms work properly, but I need to be able to collect two values from each chosen multi-select listing. 
    Right now, when a user chooses an item under 'products', the site pushes back product_id, one of the variables I need.  I would also like product_parent_id to return with each result as well.  I need to be able to insert product_parent_id after the user has chosen their desired products.  product_parent_id is located in the same table as product_id.
    In the end, I need those two values to be pushed to another table, essentially creating a new entry for each product in the bundle.  Referenced by ID and parent ID.
    Pasted below is the administrator form code.  Any suggestions would be wonderful.
    Thanks!
    <?php require_once('Connections/SQLTest.php'); ?>
    <?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;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_related_products (product_id, related_product_id) VALUES (%s, %s)",
                           GetSQLValueString($_POST['products'], "int"),
                           GetSQLValueString($_POST['products'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations (discount_type, discount, shopper_group_id) VALUES (%s, %s, %s)",
                           GetSQLValueString($_POST['amount_off_total'], "text"),
                           GetSQLValueString($_POST['dollar_amount'], "int"),
                           GetSQLValueString($_POST['shoper_group'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations_messages (discount_message) VALUES (%s)",
                           GetSQLValueString($_POST['discount_message'], "text"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    $maxRows_Products = 10;
    $pageNum_Products = 0;
    if (isset($_GET['pageNum_Products'])) {
      $pageNum_Products = $_GET['pageNum_Products'];
    $startRow_Products = $pageNum_Products * $maxRows_Products;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_Products = "SELECT * FROM jos_vm_product";
    $query_limit_Products = sprintf("%s LIMIT %d, %d", $query_Products, $startRow_Products, $maxRows_Products);
    $Products = mysql_query($query_limit_Products, $SQLTest) or die(mysql_error());
    $row_Products = mysql_fetch_assoc($Products);
    if (isset($_GET['totalRows_Products'])) {
      $totalRows_Products = $_GET['totalRows_Products'];
    } else {
      $all_Products = mysql_query($query_Products);
      $totalRows_Products = mysql_num_rows($all_Products);
    $totalPages_Products = ceil($totalRows_Products/$maxRows_Products)-1;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_shopper_group = "SELECT * FROM jos_vm_shopper_group";
    $shopper_group = mysql_query($query_shopper_group, $SQLTest) or die(mysql_error());
    $row_shopper_group = mysql_fetch_assoc($shopper_group);
    $totalRows_shopper_group = mysql_num_rows($shopper_group);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
      <p>
        <label for="products"></label>
      Choose the product(s) you would like to add to your new discount bundle.</p>
      <p>
        <select name="products" size="1" multiple="MULTIPLE" id="products">
          <option value=""></option>
          <?php
    do { 
    ?>
          <option value="<?php echo $row_Products['product_id']?>"><?php echo $row_Products['product_name']?></option>
          <?php
    } while ($row_Products = mysql_fetch_assoc($Products));
      $rows = mysql_num_rows($Products);
      if($rows > 0) {
          mysql_data_seek($Products, 0);
      $row_Products = mysql_fetch_assoc($Products);
    ?>
        </select>
      </p>
    <p>
      <input type="hidden" name="hiddenField" id="hiddenField" />
      </p>
      <p>Choose the subscriber group that you would like this discount to apply to.</p>
      <p>
        <select name="shoper_group">
          <?php
    do { 
    ?>
          <option value="<?php echo $row_shopper_group['shopper_group_id']?>"><?php echo $row_shopper_group['shopper_group_name']?></option>
          <?php
    } while ($row_shopper_group = mysql_fetch_assoc($shopper_group));
      $rows = mysql_num_rows($shopper_group);
      if($rows > 0) {
          mysql_data_seek($shopper_group, 0);
      $row_shopper_group = mysql_fetch_assoc($shopper_group);
    ?>
        </select>
      </p>
      <p>Please enter the dollar amount that you would like to adjust.
        <label for="dollar_amount"><br />
        </label>
        <input type="text" name="dollar_amount" id="dollar_amount" />
      </p>
      <p>
        <input name="amount_off_total" type="hidden" id="amount_off_total" value="amount_off_total" />
      </p>
      <p>Enter any message you would like the shopper to view during shopping and checkout when this discount is applied.</p>
      <p>
        <label for="discount_message"></label>
        <textarea name="discount_message" id="discount_message" cols="45" rows="5"></textarea>
      </p>
      <p>
        <input type="hidden" name="MM_insert" value="form1" />
      </p>
      <p>
        <input type="submit" name="submit" id="submit" value="Submit" />
      </p>
    </form>
    <br />
    </body>
    </html>
    <?php
    mysql_free_result($Products);
    mysql_free_result($shopper_group);
    ?>

    Thanks guys for you reply , [Cor Ligthert] I post this in Visual basic section, I appreciate your solution [dbasnett],
    Thanks for that idea of attribute <Flags> [Blackwood] ,
    Dictionary will not work in IF Statement as I want it , also ParamArray tbl() , thanks guys.
    Here is the code
    Module myModule
    <Flags()>
    Enum Table As Integer
    Table1 = 2
    Table2 = 4
    Table3 = 8
    Table4 = 16
    Table5 = 32
    End Enum
    Public Sub MySub(ByVal Table As Table)
    If (Table And Table.Table1) = Table.Table1 Then
    MsgBox((Table And Table.Table1))
    End If
    If (Table And Table.Table2) = Table.Table2 Then
    MsgBox((Table And Table.Table2))
    End If
    If (Table And Table.Table3) = Table.Table3 Then
    MsgBox((Table And Table.Table3))
    End If
    If (Table And Table.Table4) = Table.Table4 Then
    MsgBox((Table And Table.Table4))
    End If
    If (Table And Table.Table5) = Table.Table5 Then
    MsgBox((Table And Table.Table5))
    End If
    End Sub
    End Module
    Class Myclass
    Private sub CallTables()
    MySub(Table.Table1 Or Table.Table2)
    MySub(Table.Table2 Or Table.Table3 Or Table.Table4)
    MySub(Table.Table1 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table3 Or Table.Table4 Or Table.Table5)
    end sub
    end Class

  • Update select list with dynamic LOV

    How exactly do you do this?
    Currently I have a text field which the user may enter a product type and a button when click. It would populate the select list with the product names that associate with that product type...
    My lov would retrieve the product type value text field(:P1_t_prod_type) and get products names by type
    select t_prod_name A , t_prod_name B
    from t_prod_items
    where t_prod_type = :P1_t_prod_type
    order by 1Im kind of stump on is setting up my dynamic action to "set value" to the select list. As nothing seems to be appearing.

    product type is a numeric value that can be a wide numeric range. (I don't know why the column is named like that. Sorry for forgetting to mention that)
    Well I don't think i should submit the page? because after the list box is filled with product names. the user can then select one of those names from the list box and continue completing the rest of the form. After all that the page would then be submited. (Well that's how i imagine it to work...)
    Wouldn't i run into problems if i were to submit the page twice... like lost entry in other text fields if the user were to skip that part at the start.

  • Dynamic select list crashes with php

    HI All,
    I can't seem to get a dynamic select list to work in
    dreamweaver. It completly crashes everytime I try adding it to my
    page. I found someone else in the forum who had the same problem
    but no one ever responded. I've tried several things including
    putting just the record set and dynamic select on it's own page
    with no other code on it. It still crashes DW. I also tried coding
    it myself by making a listmenu and modifying it so that the option
    value equals a PHP echo of a value. It crashed there too. Does
    anyone have a piece of code with a working dynamic select list that
    uses a record set that I could look at? That way I can see where
    I'm going wrong. All I'm trying to do is get a simple drop down
    select list of employee names so someone can choose their name to
    get commission. It's a one table, 2 fields (first & last name)
    record set.
    Using DW CS3, php & MySQL.,windows XP Pro
    Any help would be really appreciated!

    AthroughZ wrote:
    > I can't seem to get a dynamic select list to work in
    dreamweaver. It
    > completly crashes everytime I try adding it to my page.
    It looks as though you have a corrupt cache file. Follow
    troubleshooting
    step 4 in the following technote:
    http://www.adobe.com/go/tn_19105
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Dynamic list... select list with submit

    Hi,
    I am trying to create a dynamic list and based on the selection I want to pass the parameters… Here is what I’ve done so far
    Step 1… created a list of values (through shared components) using a query
    Step 2… created an item… used option to select list with submit…
    Here is the challenge: How to update my P1_Value based on the value from Select list…
    Thanks in advance

    I've created a page process by following these steps
    Create Page Process:
    Category of the process: Session State
    Session State process type: Set Preference to value of Item (PreferenceName:ITEM)
    Point: On Submit after computation and validation
    Preference Item: P1_Value
    Getting an error message:
    Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement ignored

  • Select List with Submit : a display and a return value are needed...error

    Hi,
    Why the next SELECT returns error in Select list with submit ?
    List of values definition:
    SELECT b.nom nom_bannniere,
    b.no_banniere no_bann
    FROM banniere@my_source b
    WHERE b.statut = 0
    ORDER BY nom_bannniere;
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.

    gfrancoeur,
    Try this SQL:
    SELECT b.nom d,
    b.no_banniere r
    FROM banniere@my_source b
    WHERE b.statut = 0
    ORDER BY 1Thanks,
    - Scott -

  • Select list with URL redirect - not showing the same display value selected

    Hi
    I have several select lists with URL direct on my page similar to this
    for p6_queries item the LOV is
    select QUERY_NAME display_value, 'f?p='
    || :APP_ID
    || ':'
    || 6
    || ':'
    || :APP_SESSION
    || '::::p6_queries:'||QUERY_ID||'#qtables' return_value from .....
    I am assigning a return value to the item p6_queries. But when the page is redirected, I dont see the selected value as selected in the list. Instead it goes to the null display text. Can any one help me on this?

    The problem is that your setting the item value to value of query_id. But your select list has the value of each item as the URL so it will never match and show you what you selected.
    The best thing to do may be to change your select list from a "redirect to URL" to "submit page", make it a normal query:
    select QUERY_NAME display_value, QUERY_ID return_value ...
    Then create an "On Submit: Before Computation" branch:
    Target Type: URL
    URL Target: f?p=&APP_ID.:6:&SESSION.::&DEBUG.::P6_QUERIES:&P6_QUERIES.#testing
    Condition Type: Request = Expression 1
    Expression 1: P6_QUERIES

  • Select list with submit using on a dynamic report

    Hi! I'd like to know how can I create a Select list with Submit using the HTMLDB_ITEM API.
    I know there's an API named HTMLDB_ITEM.SELECT_LIST_FROM_LOV(), but I'd like to know how can I reproduce in there the submit everytime the user changes a value.
    Thanks!

    Hi! I've discovered there's a parameter on this function that allows me to include a javascript like the example below:
    select HTMLDB_ITEM.SELECT_LIST_FROM_LOV(3, ctr_id,'LOV_COUNTRIES','onChange=javascript:doSubmit()','NO)
    from XXXX;
    The thing is I don't know how exactly this javascript:doSubmit() works, because it works different than creating a select list with submit item.
    If I create on a page a simple "select list with submit" item, and if I run the page, after changing the value of the select list it refreshes the page but it doesn't erase the values inserted on the other items. But if I have this HTMLDB_ITEM.SELECT_LIST_FROM_LOV function, after changing the value of the select list it refreshes the page but it erase the values inserted on the other items and recovers the old values..
    I really need your help on this.
    Thanks in advance :-)

  • Dynamic Select List / Radio Buttons triggering conditional display of field

    Hi HTMLDB Team,
    I wanted to mimic this very nice and useful HTMLDB 'select list feature' at the HTMLDB "Create Application ... from Application Export file " ... option .
    ie when you hit the form that asks you to "install the application", i,e
    Builder - Application >Export Import>Export Repository>Install Application
    you have the the following radio Options :
    Install As Application
    X Reuse Application ID 401 From Export File
    X Auto Assign New Application ID
    X Change Application ID
    New Application
    The "New Application ID" field appears only when I select "Change Application ID" radio option. That great and that's exactly what I want.
    How do you do that ?
    I am currently using a select list instead of radio list. It's the same thing ... I
    I tried " many options of the "select list with redirect .... with submit .... but I was not successfful. All I am trying to achieve is to offer a list of departments ... but when the user select "other", I want to show a text field for the user to type in the "other Department" ... without losing what I had already entered in the form previously and without actually Submitting the form . I still have other fields to enter after the select list .
    Is that possible with pure HTMLDB ?
    Or do I have to craft up some Javascript .
    I'd prefer pure HTMLDB .. I do not want to use javascript, to avoin a maintenance nightmare once I submit the code to other developers ...
    Can you pls help ?
    Thanks a lot.

    Hello,
    Take a look at these built in javascript function
    they should give you what you want.
    http://htmldb.oracle.com/pls/otn/f?p=11933:39
    CarlCarl,
    if I understand it right, these functions are already built in Apex 2.2.1.
    I need to show an item with label when user selects certain radio button. This sounds like the opposite to f_Hide_On_Value_Item_Row function.
    Can this task be done with apex built-in javascript functionality at this moment?
    Thanks

  • Can we have the 'select list with submit' type within a tabular form?

    An item can be the "Select list with submit' type so a form has no problem with it. However, when I built a tabular form manually, I couldn't find this type. There are only three types avaiable: "named", "static", and "dynamic".
    Is it possible to have the "submit" type so columns of the tabular form can be dynamically rendered based on the user inputs?
    Another question I have is how to dynamically build the tabular form with decode func. For example, if the value of col_1 is 'val_1', then build a select list in col_2; otherwise null in col_2.
    I tried to use
    select col1,
    decode (col1, 'val_1', select htmldb_item.select_list_from_lov(2, first, 'lov1') from dual, null)
    from....
    where....
    But it didn't work.
    I'd like to know whether it's feasible to have something like that.
    TIA.
    Message was edited by:
    Luc

    You could use a region of type PL/SQL function
    returning SQL query to dynamically build this kind of
    tabular form. However if you want to use the built-in
    multi-row insert, update and delete processes, all
    items in a column must have the same display type. Marc, thanks for the quick reply. I appreciate it.
    I got your idea. However, I need to have the javascript 'ToggleAll' as the heading so the form works as same as the built-in one. If I put the query definition into a pl/sql procedure, where I can put this html tab attribute? It can not be inside the checkbox function, otherwise the checkbox of any row would act as same as the header.
    I hope I've made this clear.
    To Vikas: It's our clients who want this, not us. :(

  • Chart based on Select list with submit Lov problem

    Hi,
    I have one page with interactive report showing username with links, date and
    database actions.
    Another page contains one region having flash chart based on select list with submit Lov.
    The lov is created by dynamic query.
    Every time when i click the 1st page report link, the 2nd page lov is populating the value automatically. But the problem is chart displays NO DATA FOUND message though the LOV has many values.
    I don't want to display any null values so set to NO for LOV
    I tried to write Before header computation (PL/SQL Function Body) to set the lov value, but the query is displayed as such.
    I don't want to assign any static default value also as the values are dynamic for every link.
    The following is my Before header computation of Select list with submit (Item name is p11_schema). (PLSQL Function Body)
    begin
    if :p11_schema is null then
    return 'select distinct owner schema1, owner schema2 from auditing
    where access_date=' || :p11_access_date
    || ' and username=' || :p11_username
    || ' order by owner';
    end if;
    end;
    This is my chart query.
    select null link, obj_name label, sum(sel_count) "Select", sum(ins_count) "Insert", sum(upd_count) "Update", sum(del_count) "Delete" from auditing
    where username=:p11_username
    and access_date=:p11_access_date
    and owner=NVL(:p11_schema, OWNER)
    group by owner, obj_name
    Example: If there more than one records in the lov, the graph should display the 1st record. When i select another record, the chart accordingly display the selected values. But inially it should not display "NO DATA FOUND" message.
    I tried using all the combinations of computation type for the lov, SQL query ( I could not use if conditon then), PLSQL expression, PLSQL function body. But it does not work out.
    Can anyone please help me out.
    Thanks.

    Hi Scott,
    Thanks for your reply.
    I found out the solution for this problem as below.
    But i did it in different way to tackle the dynamic query wich returns more than one record using rownum always the 1st record when it is empty instead of assigning constant (static) value like '1'. And i am returning LOV itself for both null or not null condition as below.
    Declare
    q varchar2(4000);
    begin
    if :p11_schema is null then
    q:='select distinct owner schema from auditing';
    q:=q || ' where username=:p11_username ';
    q:=q || ' and access_date=:p11_access_date ';
    q:=q || ' and rownum<2 order by owner';
    Execute immediate q into :p11_schema USING :p11_username, :p11_access_date;
    end if;
    return :P11_SCHEMA;
    end;
    Thanks.

Maybe you are looking for