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.

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

  • JComboBox setSelectedIndex not displaying correct value

    Hi,
    Not sure if this is a bug or implementation issue.
    When trying to use the setSelectedItem(int) method of JComboBox, what's being displayed in the panel is not the same item that is selected when you open the dropdown.
    If you run the example code below a few times in a row you'll see that it eventually displays something other than "Item 2". However, if you open the combobox it will always display the correct value. So, just on a whim I surrounded the setSelectedIndex(int) call with the SwingUtilities.invokeLater method and it all started to work. I was able to run it 6 times in a row and always displayed the correct value. Whereas without it usually by the 3rd run, I'd see the issue.
    So, my question is - Should I be putting all setSelectedXXX() methods in SwingUtilities.invokeLater methods? We originally found this issue in our JApplets. I made the code below so I could post it, but essentially it's the same thing. We do use Javascript to call back into the JApplet to set the indexes. I'm guessing I DO need to since we're dealing with different Threads and Swing?
    Thanks,
    - Tim
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.swing.JComboBox;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author tmulle
    public class Test {
        public static void main(String[] args) {
            // Create the Frame
            JFrame f = new JFrame();
            final JComboBox combo = new JComboBox();
            // Add some items to the combo
            for (int x = 0; x < 20; x++) {
                combo.addItem("Item " + x);
            // Create a scrollpane
            JScrollPane pane = new JScrollPane(combo);
            f.getContentPane().add(pane);
            f.setSize(300, 200);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            // Tester thread
            Thread t = new Thread(new Runnable() {
                public void run() {
                    try {
                        Thread.sleep(5000);
                    } catch (InterruptedException ex) {
                        Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
                    // Uncomment this and things seem to work consistently
    //                SwingUtilities.invokeLater(new Runnable() {
    //                    public void run() {
    //                        combo.setSelectedIndex(2);
                    // Comment this out when uncommenting above
                    // This is supposed to select the 2 index in the list
                    // However, run running the example multiple times you'll see
                    // that it sometimes displays something other than the correct
                    // value. But the correct items is selected in the dropdown
                    combo.setSelectedIndex(2);
            // Start the thread
            t.start();
            // Show the frame
            f.setVisible(true);
    }

    You do need to set the selected index from the EDT, as shown in the code you commented out. Or, the SwingWorker class is very useful for simplifying your threading code.
    Also, if I may, I think Darryl is suggesting you also create the gui components in the EDT as well. People often use this construct in the main method since the main method is run in a separate thread from the EDT, just like the threads you create. It is technically not safe to make Swing calls from the main() method.
    public static void main(String args[])
            SwingUtilities.invokeLater(new Runnable()
                public void run()
                    createAndShow();
    }Edited by: mpmarrone on Apr 27, 2010 1:08 PM

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

  • Multiple select list not retaining the value for the first time

    Hi,
    I have a 3 select list depends on each other. select_list1 -- > select_list2 --> multiselect3. I have use denes example to create them.
    For the first time when I select values from 1,2,3 and runs a report based on it, it works fine but *does not retain the selected value in multiselect3.
    for the second time submit the process, it retails value in multiselect3. Please tell me if you came across this issue before
    Here is the code.
    function get_select_list_xml_VL(pThis,pSelect,pSelect1,pSelect2){
    var l_Return = null;
    var l_Select = html_GetElement(pSelect);
    var l_Select1 = html_GetElement(pSelect1);
    var l_Select2 = html_GetElement(pSelect2);
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Cascading_Select_List_VL',0);
    get.add('F660_CASCADING_TEST',l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    alert(l_Select1.value + '_' + pThis.value + '_' + l_Select2.value);
    // alert(document.getElementById("F660_CASCADING_TEST").value);
    gReturn = get.get('XML');
    if(gReturn && l_Select ){
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var i=0;i<l_Count;i++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option");
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    function appendToSelect(pSelect, pValue, pContent) {
    var l_Opt = document.createElement("option");
    l_Opt.value = pValue;
    if(document.all){
    pSelect.options.add(l_Opt);
    l_Opt.innerText = pContent;
    }else{
    l_Opt.appendChild(document.createTextNode(pContent));
    pSelect.appendChild(l_Opt);

    Please ask any question if you dont understand about the problem.
    Thanks

  • Multiple Select List not returning multiple values

    I have created a Multiple Select List, and the manual says that when multiple values are selected and the page is submmitted (I'm using a GO button), the multiple values are put into the ITEM field, separated with a colon . However, whenever I select multiple entries in my list, it only ever returns a value for the first item (like a single select list).
    Does anybody know what I may have missed ? I'm still fairly new to this stuff, so I'm hoping it's fairly simple!
    thanks.
    p.s I'm using a dynamic list of values.

    Andy / Scott,
    Sorry, please bear with me ... still new to this.
    I have a multi select list item in page 2, called P2_MULTI_LIST. When the page is submitted, I no longer physically pass it to page 3, but how would page 3 pick up the value ? Do I need to set up a P3_MULTI_LIST item in page3 and set that item to the P2_MULTI_LIST value, or do I reference P2_MULTI_LIST directly in my Page3 SQL query ?
    Also, if I then want to propogate the value in P2_MULTI_LIST down to another page from page3, via a link in a report, is this possible ?
    thanks
    Tim

  • Proposal list not displayed correctly when selected with a layout

    Dear All
    I have an issue with payment proposal list.
    When i select EDit tab on F11o and click on proposal list, i can see the proposal list for all company codes selected in parameters.When i click on change layout the system asks me maintain variant and when i click on yes it shows me the list only for one company code.
    the new layout only shows me list for exception items and does not include payment proposal items from another company code...
    can somebody please help
    thanks
    sanjeev

    Early implementations of the POJO Factory set the default display size to 12, which caused corruption in the display starting from the 12th character when the size exceeded the display size.
    Would you try specifying the MemberColumnDisplaySize property for that column in POJOResultSetFactory to reflect the actual size?
    Sincerely,
    Ted Ueda - Developer Support

  • Dynamic menu css not displaying correctly in https

    Hello,
    Need help! I'm trying to get my menu to display properly in https but no luck so far. (Chrome and IE) Please let me know if there is a solution. Thank you.
    good menu look http://winxed.businesscatalyst.com/
    bad menu look https://winxed.worldsecuresystems.com/events/eyelash-extension-extensive-class-houston

    Just drop a zoom:100% style on the link, and IE will get it
    right.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "TC2112" <[email protected]> wrote in
    message
    news:fh2nt4$4u8$[email protected]..
    > Hello,
    >
    > The problem is with IE, not Firefox.
    > The content of your menu link tags is a clear gif image
    that is the same
    > height as the background images applied to the link tag
    that change on
    > mouseover.
    > Even though it looks like you want it to in IE, IE is
    actually rendering
    > your
    > code incorrectly.
    > Firefox is rendering your code exactly as it should.
    >
    > Your background images are applied by CSS to the link,
    not the image
    > within.
    > In standards compliant browsers like Firefox, the height
    of link
    > attributes
    > such as background and border are determined by the font
    size or line
    > height
    > that applies to that link, even if there is no text in
    the link.
    > As a test, you can add font-size:38px (the height of
    your background
    > images)
    > to "table.menu" in your CSS and you'll see your entire
    link background
    > images
    > in FF.
    > IE incorrectly streches the link background to the
    height of the image
    > within
    > within the link.
    > IE does the same thing to borders if they are applied to
    just the "a" tag
    > and
    > not to "a img" in the CSS.
    >
    > A quick fix:
    >
    > table.menu { width:186px; margin-top:6px;
    > line-height: 38px; }
    >
    > A better fix and some great information:
    >
    >
    >
    >
    http://projectseven.com/tutorials/css/uberlinks/index.htm
    >
    > and:
    >
    >
    http://css.maxdesign.com.au/listamatic/
    >
    > Hope that helps,
    >
    > Take care,
    > Tim
    >

  • Entity Descriptions are not displayed correctly in Combo box dropdown list

    In Web Analysis, Entity Descriptions are not displayed correctly in Combo box dropdown list when entity descriptions from HFM contains a dot(.)
    Example:
    'Entity A. LTD' becomes 'LTD'
    'Entity B Inc.' becomes blank
    It seems that everything before the dot is not displayed when opening the combobox.
    It looks like it is acting like the option to show short description for entities in HR where the parent-child relation is not shown. This behaviour I don't expect for descriptions. And in my opinion is not an option in Web Analysis.
    Does anybody knows the sollution or have seen this issue before?

    Hi,
    This is a known issue with combo box list of values.
    Please follow this workaround:
    - Remove ComboboxLOV on Deptno
    - Create an updateable transient attribute(Say Dname) of type String
    - Define combobox lov with following values:
    List Data Source: DeptView1
    List Attribute: Dname
    List Return Values:
    Dname - Dname
    Deptno - Deptno
    UI Hints: Display Attribute - Dname
    - Edit Dname(transient attribute) and provide following groovy expression
    oracle.jbo.Key key = new oracle.jbo.Key(Deptno);
    return DeptView1.findByKey(key, 1)[0].getAttribute("Dname");- Now, you are done and observe that Dname combo box lov shows Description even on selection and change in this combo box sets the Deptno value
    Sireesha

  • Default value dynamic select list

    Hi everybody,
    I have a question concerning dynamic select lists.
    I have a report of a table that shows some records. Each record has different versions of data. So when you click on a record you get to another page where you get some information about this record and where you can select the version of this information (with the help of a select list).
    The select list works fine and is defined dynamically as follows:
    select distinct a.name display_value,
    a.version_id return_value
    from cn_pl_version a,
    cn_pl_std_peplanung b
    WHERE a.version_ID = b.version_id AND
    b.pe_id = '&P6_HELP_PRODET.'
    order by a.version_id desc
    My problem is that when I click on a record I always get the report filled with the oldest version of the current record, so I always have to choose the newest version in the select list manually. I would prefer always to have the newest version in the report.
    The query for the report is as follows:
    select
    (select sum(stunden) from cn_pl_std_peplanung t02
    where abt_id = '10'
    and t02.pe_id = t1.pe_id
    and t02.version_id = t1.version_id
    and t02.idee_id = t1.idee_id) stunden_ir,
    (select name from cn_pl_version u01
    where u01.version_id = t1.version_id) Version
    from cn_pl_std_peplanung t1, cn_pl_projektelemente z1, cn_pl_version u1, cn_pl_projektidee s1
    where t1.version_id = '&P6_VERSION_WAHL.'
    and t1.pe_id = z1.pe_id
    and z1.pe_id='&P6_HELP_PRODET.'
    group by t1.pe_id, t1.version_id, t1.idee_id
    '&P6_VERSION_WAHL.' is the item of the select list
    '&P6_HELP_PRODET.' is the ID of the current record
    I'm not sure if you understood my problem, my english isn't the best...
    Thanks for any kind of help!!
    Patrick

    Hi Patrick,
    what value does you select list show, when you branch to the page? Is it the correct one?
    If not you should change your select list, that the correct version is selected as default. You can define a "default value" when you set the source of the element.
    Otherwise you can maybe set up an example application at http://apex.oracle.com.
    Best Regards
    chrissy

  • Discoverer List of Worksheets not displaying correctly

    We are having problems with the list of of worksheets portlet not displaying correctly every time.
    Sometimes the portlet displays the the list of worksheets on a white background with all the grid lines missing, other times it displays correctly.
    The portal is 10g and it is running over https, running over a load balancer.
    Has anyone come across this before?
    Thanks in advance

    If you use a private connection then they should be able to see their own list of worksheets.

  • Pivot table not displaying the values correctly

    Hi,
    I have created a pivot table in which i am using 2 tables. I pulled columns from table A and one column from table B in the measures section to get the grand total. All the rows are comming fine but, its not returning any values for tableB's column(if i pull it into measures).
    If the column stays under rows section, the report is comming out fine.
    I need the total to be displayed in the report.
    Can some body help me with this.
    Thanks

    Hi David,
    i have set the column's aggregation to sum, and it is comming out correctly in the grand total, how ever, i have some of the coulmns which i am taking the %
    col3= (col2/col1)*100
    col1- aggregation set as Sum, col2 and col3 is set as default
    The values for col3 are comming finr in report , where as it is not returning correct value for garnd total row.
    ex: row w--- col1 col2 col3
    row1-----6630 1130 17.04
    row2 6114 994 16.26
    total 23317 3739 56.40(should be 16.2..)
    For col3 it is calculating like this(3739-total of col2/ 6630 -first row of col1 *100)
    Instead of taking total , it is taking the first row.
    I tried different aggregations, but was still unable to get the correct value. Can you please let me know if i am missing anything.
    Can we define custom aggregations.
    Thanks
    Gayatri
    Edited by: user12589255 on Aug 3, 2011 2:55 PM

  • SharePoint 2010 Datasheet View - Filter not displaying correctly on list

    Hi,
    I have a list where I want to filter in datasheet view.  The filter will work correctly when I first open Internet Explorer:
    However, if I open the list again and go into datasheet view I get the following filter which does not display correctly:
    Has anyone else come across this?
    Mark

    Hi Mark,
    please have a try on this kb too:
    http://support.microsoft.com/kb/2760758/en-us
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Boolean values are not displaying correct

    hi ..
    i have created a application which has one report .. in report field
    there's boolean field (true or false) when i run my application
    it will show the correct results...
    but when host the application in IIS7 then the result will not
    show correct value .. it is showing only true...
    if there's a value false also it is showing true only...
    what to do.... ?

    hi..
    I have developed an web application
    i am using SAP crystal report 13 for VS2010
    and i have hosted that application in iis 7
    It is been developed in c#.net ..
    OR
    i have one solution ...
    can we create a formula so that if the value is
    0 then it should show false and if the value is
    1 it should show true... in formula field...

  • 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

Maybe you are looking for

  • Help needed on installation of Oracle 9i EE on Sun Solaris 8

    Hey, Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database C

  • How to get a copy of my final bill?

    Just ported our two VZ numbers to T-Mobile on 02/01/14.  Our VZ billing cycle ends on 02/23/14.  If I understand correctly, my current payment scheduled for 02/18/14 takes care of my bill through the end of the current cycle ending 02/23/14 and the E

  • Connect abap trial with ce 7.2 trial

    Hi expert. I have a problem I have two machines, one with win 2003 server and stack abap trial, other with win2003 server and CE 7.2 trial. Both of them works well. How do I connect CE 7.2 with abap instance ?, for implementing RFC an web services ab

  • Stupid weird tomcat problem...

    what does this mean? i'm at the end of the road with tomcat, it works when i first install it, but after restart it gives me this crap, i'm going mad about it and need help, plz spend a few seconds helping me... error: Catalina.start: LifecycleExcept

  • Tablespace creation error.

    Hi, we have created the temporary tablespace PSAPTEMP1 for the index creation. CREATE TEMPORARY TABLESPACE "PSAPTEMP" TEMPFILE '/archive/temp' SIZE 51200M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 10240K; ALTER USER PSAPPRD TEMPORARY TABLESPACE PSAPTEMP1