Tabular form, dynamic select list

Hi,
Direction as to how to tackle this problem politely requested please:
I have a "choices" table of three columns. Sample data shown below:
col1 col2 col3
a b c
a b d
a b e
f g h
f g i
The plan is to show these "choices" as a tabular form. With the example data shown above, this
would be shown as a two row grid, with the first row showing "a b" and at the end of the row there
would be a select box showing four possibilities: "c", "d", "e" or blank.
The "blank" meaning "no choice".
The second row would show "f g" and a select box for "h", "i" or "blank".
Neither the first two columns are editable by the end user - they just get to alter the third column.
How would I go about building this? Would it be a Report with a fancy piece of html for column three,
or perhaps a tabular form?
There can be more than two rows on the screen (of course) - beyond the sample data.
Any directional help appreciated; thanks in advance.
Mungo

Hi Jure,
On reflection, that mention of the "stragg" function was very useful.
My first reply to you was a little uncharitable, for which I apologise.
Tom Kyte seems to have moved away from the "stragg" function and
has used "sys_connect_by_path" instead.
See http://tkyte.blogspot.com/2007/03/stringing-them-up.html
Once all that is in place (tested out via SQL Developer - not even a mention of Apex) it
seems relatively straightforward to integrate this into an Apex region.
Thanks again.
Mungo

Similar Messages

  • Tabular form with select list not updating

    I have created a tabular form with a dynamic select list
    select primary_key, column1,
    htmldb_item.select_list_from_query(10,column2, 'select descr d, column_value r from lookup_table where column_value = '||column1) column2
    from main_table
    The select list appears to work correctly but the new value is not saved to the database. I assume this is because the tabular form element display as field for column2 is set to "standard report column" but when I select any of the "display as text" or "LOV" options either the current data is not displayed or errors are generated.
    Any suggestions?
    Thanks,
    Bob

    Hi Ian,
    As you have seen, sorting on the project_manager_id column will sort by the id value rather than the textual value. This is, of course, because this is the value in the field.
    I haven't tried this out, but one thing that may work is the fact that you don't have to include the ORDER BY fields within the SELECT statement. You could, for example, do:
    select p.project_number, p.project_manager_id
    from projects p, users u
    where p.project_manager_id = u.id (+)
    order by u.name
    Obviously, you won't be able to do this in the existing statement as you would then be blocked from using column sorting. However, it implies that if you could construct the SQL statement dynamically, appending appropriate ORDER BY strings to the end of the base select statement, you could sort by anything you like. This does, of course, mean that you would have to create a mechanism to allow the user to select the sort order, generate the appropriate string and reconstruct the entire sql statement.
    I had had a similar request quite a while ago. The underlying reason for that request turned out to be that the user just wanted to quickly locate records relating to one person. In the end, we agreed that a search filter was the best thing to do.
    Regards
    Andy

  • Apex 3.2 Tabular form - dynamic selection based on prev selection

    Hi guys,
    I am using apex 3.2. I am having difficulty in setting up a tabular form which provides an option to record information in other columns based on a value selected in the drop down.Here is an example
    I have a table product. All the products are added using a tabular form by selecting type from a drop down list.
    This allows the user to add multiple products without having to press save each time.
    e.g.
    product | type
    monopoly | game
    vase | home
    coffee | food
    cards | game
    Depending on the product type, I want the user to be able to multi-select other options using checkboxes based on the option selected.
    So for example if they add a product of type food, it should give additional options like beverage, cereal etc. If they select game, then they should get other options like for age_groups 10-12; 12-16; 18 and over;
    Is it posisble to do this on a tabular form in apex 3.2?
    If yes, please can someone help.
    Thanks
    Sam

    Closed

  • Tabular Forms and Select Lists

    Hi,
    I have an updateable tabular form, and one of the updateable columns I want as a select list. I need the SQL that populates this select list to be based on a hidden value in the tabular form. Is this possible?
    Cheers
    Simon

    Hey Simon,
    Sounds reasonable, you'll have to end up using the HTMLDB_ITEM.SELECT_LIST_FROM_LOV function within the query that is populating your form.
    http://www.acs.ilstu.edu/docs/Oracle/appdev.101/b10992/mvl_api.htm#CHDFGAEC should give you a bit more help towards sorting it out. Don't hesitate to post again if you have anymore queries.
    Ruari

  • Issue with my Tabular form Cascading Select List

    Hello Friends,
    I have implemented a Cascading select list in a tabular form with the below SQL ...
    SELECT apex_item.hidden(31,line_no)
      || apex_item.select_list_from_query(32, POLE_CODE_ID, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
      || 'onchange="f_set_casc_sel_list_item(this,'
      || 'f33_'
      || LPAD (line_no, 4, '0')
      || ')"', 'YES', '0', '- Select Pole -', 'f32_'
      || LPAD (line_no, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
      apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS', 'style=""', 'YES', '0', '- Select Country -', 'f33_'
      || LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
      apex_item.text(34,LEGAL_ENTITY) LEGAL_ENTITY,
      apex_item.text(35,BUSINESS) BUSINESS,
      apex_item.text(36,COUNT_OF_NAMED_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
      apex_item.text(37,COUNT_OF_CONCURRENT_USERS,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
      apex_item.text(38,INVENTORY_ORG) INVENTORY_ORG
    FROM cp_sites_details
    WHERE cap_plan_id = nv('P94_CP_ID')
    UNION ALL
    SELECT apex_item.hidden(31,NULL)
      || apex_item.select_list_from_query(32, 0, 'select POLE,POLE_ID from CAP_PLAN_POLE_DETAILS', 'style="" '
      || 'onchange="f_set_casc_sel_list_item(this,'
      || 'f33_'
      || LPAD (9900 + LEVEL, 4, '0')
      || ')"', 'YES', '0', '- Select Pole -', 'f32_'
      || LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) POLE_CODE_ID,
      apex_item.select_list_from_query(33, NULL, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS WHERE POLE_ID=0', 'style=""', 'YES', '0', '-
    SELECT Country                                                                                                                                                                                                                                                                             -', 'f33_'
      || LPAD (9900 + LEVEL, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,
      apex_item.text(34,NULL) LEGAL_ENTITY,
      apex_item.text(35,NULL) BUSINESS,
      apex_item.text(36,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_NAMED_USERS,
      apex_item.text(37,NULL,NULL,NULL,'onkeyPress="return OnlyNumbers(event)"') COUNT_OF_CONCURRENT_USERS,
      apex_item.text(38,NULL) INVENTORY_ORG
    FROM dual
    WHERE :REQUEST='ADDSITES'
      CONNECT BY LEVEL = 2The filters to list the countries[2nd col of SQL, field : f33] will work on Change of Pole after a selection is made..the whole list of countries will appear with out the Pole being considered. I understand that is the case because, I have not used PoleID in the query for f33
    SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS'Now, how can I fix this to use the Pole Id every time the country Select List is touched..Can I just modify the query or should I add a Java Script OnChange function to handle this...
    Please please help..
    Thanks for reading the question...

    Isn't this given in my example:
    http://apex.oracle.com/pls/otn/f?p=31517:176
    The second list is extended by adding:
    || 'WHERE deptno = '
    || c001to make sure it renders correctly once you call your report. In your case the second list would be extended by adding the following
    apex_item.select_list_from_query(33, COUNTRY_CODE_ID, 'SELECT COUNTRY,COUNTRY_ID FROM CAP_PLAN_COUNTRY_DETAILS ' || 'WHERE  POLE_ID = ' || POLE_CODE_ID
    , 'style=""', 'YES', '0', '- Select Country -', 'f33_'
      || LPAD (line_no, 4, '0'), NULL, 'NO' ) COUNTRY_CODE_ID,and that should work.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Disable columns in a tabular form on select list

    I am trying to void out or disable certain columns based on the option value selected from the select list. I have done this on a form with regualr page items. However, I am now trying to accomplish the same on a tabular form. I have tried the following function and onChange event but it doesn't seem to be working. Any idea what could be wrong?
    var htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    function Disable()
    var sel = document.getElementById('f08_0001');
    if (sel.options[sel.selectedIndex].value != '5' || sel.options[sel.selectedIndex].value != '7') {
    document.getElementById("f04_0000").readOnly = true;
    document.getElementById("f05_0000").readOnly = true;
    } else {
    document.getElementById("f04_0000").readOnly = false;
    document.getElementById("f05_0000").readOnly = false;
    THe onChange event : onChange="Disable()"

    I've even gone ahead and tried th following code but still am having no luck
    function Disable(pThis)
    var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);
    if (pThis.value=='2') {
    $('select[name="f04"]')[currIndex].disabled=true;
    } else {
    $('select[name="f04"]')[currIndex].disabled=false;
    }

  • APEX 4.01 Tabular form with select list error

    When i create a tabular form and i add a select list(query based LOV) the form is not displayed but gives me the next error
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    somebody have an idea what is happening here
    is this still a bug in APEX 4.01?
    hope to have an answer soon.
    Hugo Perfors

    Hi Jari,
    It returns about 1100 records which i think is not much.
    But even when i narrow the amount of records the problem is not solved.
    it this a bug?
    Best
    Hugo

  • Form (Dynamic Select List)

    If I have a form, and I want to display a dropdown list dynamically. How do I eliminate the duplicates?
    Right now, I'm seeing:
    Multi
    Multi
    Multi
    Single
    Single
    Multi
    Multi
    Jazz
    Jazz
    Jazz
    I want it to look Like:
    Multi
    Single
    Jazz

    When you build the select add a DISTINCT clause to get the distinct favles..
    SELECT DISTINCT X,Y FROM TABLE Z WHERE...
    Thank you,
    Tony Miller
    Webster, TX

  • Can I use dynamic select list in task form?

    Hi
    If I need to chage text input in task form to select list which dynamic from some database, Can I do it? If I can, how to do its ?
    Thanks
    User520932

    If you mean that you want to change the 'outcome' list of the human task, then this is not possible.
    Marc
    http://orasoa.blogspot.com

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • Dynamic select list: link to another page

    Hi
    Have following dynamic select list at the bottom in "product.php" page (www.dolls.com.sg)
    <div id="selectcat">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>"<?php if (!(strcmp($row_rsCategories['categoryName'], $row_rsCategories['categoryName']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
    My target is, whenever a visitor clicks on a category in the pull down menu, he is forwarded to the respective "categories.php" page.
    How can I do that?
    Thanks
    Helmut

    Change your code to this:
    <div id="selectcat">
    <form method="get" action="categories.php">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>">
        <?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
      <input type="submit" value="View Dolls">
    </form>
    </div>
    In categories.php, use $_GET['Categories'] to filter the recordset.

  • Creating dynamic select list

    I have a dynamic select list populated by site names and URLs from a map; when a user clicks on an entry the site name and URL will fill two text boxes. There are also buttons to add, update, and delete entries. These buttons lead to actions within my JPF file.
              When I select an entry to delete, the script runs a delete SQL statement again my Ora db instance, then the page content is repopulated. I want to know how come when I do that I always get the sequence ID of the just deleted entry at the end of my select list.
              Here is a snippet of what I've got:
              JSP:
                        <netui:select
                dataSource="{actionForm.siteList[0]}"
                optionsDataSource="{actionForm.itemOptions}"
                size="4"
                tagId="siteList">
              <netui:textBox
                dataSource="{actionForm.title}"
                size="30" maxlength="200" tagId="title"/>
              <netui:textBox
                dataSource="{actionForm.url}"
                size="30" maxlength="200" tagId="url"/>
              <netui:hidden dataSource="{actionForm.key}"
                tagId="key"/>
              <script language="javascript">
                <!--
                <%=session.getAttribute("jsArray")%>
                  function siteClicked()
                    var index =
                      document[getNetuiTagName("process",this)]
                      [getNetuiTagName("siteList",this)][
                        document[getNetuiTagName("process",this)]
                        [getNetuiTagName("siteList",this)]
                        .selectedIndex]
                      .value
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("key",this)].value
                      = index;
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("title",this)].value
                      = siteArray[ index ][0];
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("url",this)].value
                      = siteArray[ index ][1];
                -->
              </script>
                                  JPF:
                        Connection conn = null;
              query = "delete from stlnt_other_ref_sites " +
                      "where stlnt_ors_site_id = " + form.getKey();
              try {
                pstmt = conn.prepareStatement( query );
                pstmt.executeUpdate();
              } catch (SQLException ex) {
              try {
                Map map = new LinkedHashMap();
                while ( rs.next() )
                  map.put(new Integer(rs.getInt(1)), rs.getString(2));
                  jsArray += "siteArray[" + rs.getInt(1)
                    + "]=new Array(\"" + rs.getString(2)
                    + "\",\"" + rs.getString(3) + "\");";
                  hasResults = true;
                options = map;
                getSession().setAttribute("jsArray",jsArray);
                getSession().setAttribute("hasResults",
                  String.valueOf(hasResults));
              } catch (SQLException ex) {
              

    OK I got it working... Mostly... I don't know if it was a combination of changes that made the difference, but I'll put down what I did. First, I switched my select object in the form bean into just a string type from a string array (it was allowing the selection of one entry anyways). Second, rather than just blanking out the options map, I also blanked out the select object [eg form.setSelect("")].
              Now when I select an entry and click delete, the resulting select list is short one visible element. However, you can still select the blank spot where that last entry used to be. However, this is not a huge issue for me now; I will investigate this at a later time.

  • Dynamic Select List - XML and umlaut

    Hi, I've recently implement a dynamic select list as per [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=327306], however it seems to break if I have any words containing an umlaut. I've tried setting the header on the Application Process to UTF-8 (OWA_UTIL.mime_header ('text/xml', FALSE, 'utf-8');) but it doesn't seem to make any difference. The word in particular giving me problems is Kühne - it's the only non english entry so far, but I would expect others in the future.
    Does anyone have any ideas how to allow this character to be parsed correctly? Short of using replace to check for this and every other possible character I'm not sure what else to do.
    Thanks

    Pete88 wrote:
    Hello
    I would like to create a dynamic select list where you can start entering a name and select list reduces with each character entered.
    E.g. A list of towns in the UK where you want to select London. This list is delay as normal and as start typing by the time you have entered “Lon” the list only has few names starting with “Lon”
    I expect I need a JavaScript to active this?Not in APEX 4.x. Use a Text Field with autocomplete item.

  • Dynamic Select List in Reports

    Hi,
    I have come across solutions to implement dynamic Select Lists. But can the same be implemented in a report.
    I have a report of 2 columns which are select lists. The Value of one depends of the other.
    Can this be done?
    Thanks in Advance

    Hi Abdullah,
    Thanks for the Tip. However, couple of queries.
    1) The first modification involves changing the query to : select lov_pkg.savekey() , colA, colB, ... But the function savekey takes a value.
    Ideally, I need this function to be called while loading and when the first select list is changed. How can this be done.
    2) Also, To make this change in query, I had to use (Use Generic Column Names (parse query at runtime only)) option. Now my Add Row button doesnt work? Can you tell me how that can be customized.
    Thanks,
    Sunil

  • 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/

Maybe you are looking for

  • How to find out the Transactions used per month & the USER who used that

    Hi, 1)How to find out the Transactions used per month & the USER who used that? 2)and can i get the above same for minimum 20 month? System : SAP- Enterprise Core Component.

  • Where to download SIP_VoIP_3_x_Settings_v2_0_en.si...

    Hi I have Nokia E52 and would like to install SIP_VoIP_3_x_Settings_v2_0_en.sis but I can not find any link. the link at Nokia is dead pls help thanks Met Solved! Go to Solution.

  • Using two computers - Photoshop Elements

    I live in the USA for part of the year and the UK for the remainder and wish to purchase Adobe Photoshop Elements - Does the license let me download it onto 2 separate computers (one in UK & one in USA) . I use a separate hard drive for files so I ca

  • When Firefox 4 is running it seems to slow my whole Mac down

    When multiple apps are open everything slows down. This never happened with Firefox 3.6. Even when I quit Firefox it takes it almost a minute to close. I have a Mac Book Pro with Snow Leopard OSX 10.6.7 Often when I try to do something (Any app) the

  • MAKE AN IMAGE USING A FUNCTION

    HI genius.... i want to make an image using the function 1/cos(RotAngle).The image will look like i have attached below. faithfully. akhil... Attachments: New folder1.jpg ‏59 KB