Help needed on combo-box dynamic values??

Hi ,
i need to populate values in 2 combo-boxes where the values
in the second combo is dependent on the first .. from db ...
i.e if i select a value in 1 combo then the values in the second combo should be populated accordingly from the db..
pls suggest on this.

You can use onchange event of the first combo box, then you can submit a form sending the first combo box value, then response filling the second combo box.
If you don't want to make a request, you should use ajax to get data from database.

Similar Messages

  • Need Help, retrieving a combo boxes actual/print/visible value instead of the export value.

    Hello,
    I need help, retrieving a combo boxes actual value, not the export value.
    I have a combo box with multiple options to select from.
    each of those selections has a separate export value, which is in the form of a number, which I use to calculate dates in a separate field.
    However, I have another field that i want to retrieve the, users selected value, which is text, from the combo box instead of the export value.
    Is there an easy way to do this.
    This is what I am currently using. But like I said the results are that I retrieve the export value and not the selected text value.
    event.value = this.getField("_Arugula").valueAsString;
    Thanks

    First get the currentValueIndices property of the combo box and use it with the getItemAt field method to return (what I call) the display value. Something like:
    var f = getField("combo1");
    var display_value = f.getItemAt(f.currentValueIndices, false);
    See the documentation for more information

  • Populating Combo Box list value In Multiple Row

    Hi,
    i to have the same problem .
    I have used add_list_element to populate the list value of the combo box in multiple row.
    I am selecting the list value from the database where the combo box value will be different for each row. However, when i do this.
    All the previous row combo box list value will follow the combo box value in the last row. How can i resolve this?
    i tried with lov but hasnt had any sucesss.in case of LOV can we make the list to appear automatuically and select a value????i havent had much sucesss over it??
    is thr any work around for this apart from lov?

    Hi,
    which product or technology are you talking about ?
    Frank

  • I need a combo box with 4 values to choose from which will populate a text box on the form with text related to each combo box selection

    For example:
    Combo box choices:
    apple
    tomato
    squash
    Pumpkin
    The text box depending on the selection above would state the color:
    Green        (if Apple was chosen from the combo box
    Red           (if Tomato was chosen from the combo box
    Yellow       (if Squash was chosen from the combo box
    Orange      (if Pumpkin was chosen from the combo box
    I am very new at this and have spent hours looking for an answer.  Thank to anyone in advance who can help!

    Place each value as the export value of the options in the combo-box and then use this code as the text field's custom calculation script:
    event.value = this.getField("ComboBox Name").value;

  • Combo Box Valid Values Update

    Hi All,
    I'm developing a Form which has BP Code and a ComboBox which, after entering a valid Supplier in the BPCode EditText, updates the ComboBox with the Supplier Catalog Numbers of all the Items where the CardCode (in OITM) matches the BPCode.  I have this working for the first change of BPCode but when the BPCode changes I want to update the ComboBox ValidValues.  I have tried many methods but cannot remove the ValidValues which are already there.  I have tried linking the ComboBox to a DataTable, clearing the DataTable and rebinding but this doesn't seem to work either.
    Any help on removing ValidValues from a list when I don't know what is already there (as the VV list is now out of scope) or adding a data bound ComboBox would be most appreciated.
    Thanks in anticipation,
    David

    Hi David,
    Try following
            'get the reference to the state combo box
            oCombo = oForm.Items.Item("combo box unique id").Specific
            'remove existing items if any
            'before adding new items
            For Flag = 0 To oCombo.ValidValues.Count - 1
                oCombo.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index)
            Next
    After this, use a recordset or datatable to retrieve the records, and than a loop to add valid values to the combo box.
    Rahul

  • Populating a combo box using values in a table

    I am trying to populate a drop down box with values from a table. I have got so far.
    The combo box is populated however the values in the box are blank.
    Can some suggest the necessary modifications?
    $query="select distinct(house_type) from tbl_accommodation";
    $stmt = ociparse($conn, $query);
    ociexecute($stmt);
    echo '<select name="house_type">';
    echo '<option value = "-1">Select:</option>';
    while($row=ocifetch($stmt)) {
         echo '<option>' . $row['house_type'] . '</option>';
         echo '</select>';
    Thanks

    The ocifetch() function needs ociresult() to get the data. See
    http://us.php.net/manual/en/function.oci-result.php
    You might want to use oci_fetch_assoc() instead.
    while($row=oci_fetch_assoc($stmt)) {
      echo '<option>' . $row['HOUSE_TYPE'] . '</option>';
    }For associative arrays, use the column name in upper case.
    NB Oci_fetch_assoc() is a PHP 5 function. If you don't have it, then
    you are using PHP 4 which has a much older version of the OCI8
    extension. I'd recommend upgrading PHP, or just replacing the old
    OCI8 with a newer one. See other recent threads about how to do this.

  • Help with linking combo boxes so that some options are made unavailable

    Hello!
    I'm having trouble setting up an interactive PDF form with multiple combo boxes.
    I have designed an interactive PDF form in InDesign CS6 but am doing the final preparation and formatting in Adobe Acrobat XI Pro.
    First of all, I am not sure if I should be using combo boxes or list boxes, but the combo box seemd to look better after I export the PDF and also left the field blank, ready for selection from the drop-down menu.
    Basically I have a list of drop-down lists, but not all combinations are compatible. For example, after maing "Selection 1" in "Combo box 1", I need only "Selection 1", "2", and "3" [out of the total 5] to be available in "Combo box 2".
    I need to be able to apply this algorhythm to the next few combo boxes as well.
    Moreover, I would need some of the checkboxes disabled [the user won't be able to check them at all]when I make a certain selection in some of the combo boxes.
    Needless to say, I don't know any Java, coding or making calculations in LiveCycle Designer, so I don't even know where to begin.
    I have attached a screen grab of my form and what I want to achieve.
    Any help would be very much appreciated.
    Thank you!

    If it is static data, I would suggest you to cache it rather than having it in each of the user session. You can have configuration/code to refresh when needed. Please look at any available caching frameworks (EhCache, OSCache etc...)

  • Please help how to pass the dynamic value to VO -- Urgent.

    Hi,
    I have an Oracle Standard VO( SQL Query). As per my requriemnt i extended standard VO with one new feild.Now i want to query the new VO dynamically.
    How to pass the dynamic values to new query?
    for refence i am giving my old query.
    select
    secondary_inventory_name as SubInventoryName,
    description as Description,
    from mtl_secondary_inventories
    my new Query is like this:
    select
    secondary_inventory_name,
    description,
    Item
    from mtl_secondary_inventories
    where item='123456'
    I want to pass this "where item="123456" as dynamically. please help where i will do the change's.
    Thanks,
    Sekhar.

    Hi,
    thanks pratap for quick response...but i am extending VO from Standard VO.
    I have a Standard VO which contains a bind variable suppose :1.
    I have extended this above standard VO and i want to add another bind variable say :2 to the custom VO.
    Please tell me how will i pass bind parameter value to the bind variable in runtime ?
    what are files i want to change?
    Thanks,
    Sekhar.

  • Combo box displays value instead of label

    I have several combo boxes on a vi that will occasionally start displaying the value of an certain items instead of the string label when an element is selected. The only way to fix it is to deleted the combo box and replace it with another. This has happened several times on the same vi. Sometimes it is ok when the vi is run in the IDE but shows up in an executable. Is this a bug?
    Thanks,
    Bill F

    I think this is to be expected. Your control will have a value with no associated text.
    It would be much more dangerous if LabVIEW would randomly change (e.g. coerce) the value when the strings array gets shorter by some mechanism.
    You have several possibilities, for example:
    (1) Check the value and coerce to the highest valid entry or switch to entry zero.
    (2) Keep the array of strings at constant size, but replace the unwanted entries with empty strings (see attached), the string "out of range", "invalid selection", or similar.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ComboMOD.vi ‏24 KB

  • Combo Box - List Value Property

    I have a combo box in a form (Forms 10G) which is populated at runtime using values from a parameter table.But when I generate the form it gives a warning message that the list item property has to be filled .
    The combo box should display only the values from the database but it should not have any default values.
    How can I supress the warning message and avoid entering the list values proeprty at design time.
    Thanks in Advance.

    The warning is part of forms functionality, but is just that, a Warning, and the form should compile if not an error exists. Not sure if there's a way to suppress it, and You can simply leave the list with no values in Your design, as You will provide them at runtime. If coding is ok Your list should display the values You extract from the DB

  • Load data in a combo box dynamically

    hello everybody!
    I need to load a combo box, depending on the selected data in another, eg by selecting the country and loaded societies selected country.
    Someone could guide whether this is possible, and if you have any examples that would be great.
    greetings

    user javascript events. "onload" and call some method so that it'll do your job(adding elements to combo).
    Edited by: Diablo_Chiru on May 15, 2008 4:35 AM

  • Help needed in Drop down list value input

    Hi experts,
    My problem is, I added a field on a screen as a drop down list box and passed all the values to it. Everything is fine. But I need to display the field like if there are no input values to be used by the user, the user should be able to enter some value manually which is not in the list. I'm unable to get this facility. Plzz Help me out.
    It's really urgent. Points will be rewarded to the solution.

    hi ,
    Here is a sample of code for creating a dropdown list in screen painter , and this has got the solution of your question :
    module create_drop_down_box_material output.
      select matnr from mara
               into table l_tab_mara_matnr
               where matkl = 'ZPMBMAT'.
      if not l_tab_mara_matnr[] is initial.
        select maktx from makt
                     into  l_tab_collect_maktx_frm_db-material_descr
                     for all entries in l_tab_mara_matnr
                     where matnr = l_tab_mara_matnr-material_no.
          append l_tab_collect_maktx_frm_db.
        endselect.
      endif.
      loop at l_tab_collect_maktx_frm_db into l_wa_collect_maktx_frm_db.
        l_wa_mat_descr-key = l_wa_collect_maktx_frm_db-material_descr.
        append l_wa_mat_descr to l_tab_mat_descr.
      endloop.
      name = 'ZCOT_PPT_DTLS-MATERIAL_DESCR'.
      call function 'VRM_SET_VALUES'
        exporting
          id              = name
          values          = l_tab_mat_descr
        exceptions
          id_illegal_name = 1
          others          = 2.
      free: l_tab_mat_descr,l_tab_collect_maktx_frm_db.
    endmodule.                 " create_drop_down_box_material  OUTPUT
    Regards,
    Ranjita

  • Help needed urgently to get the values from the jsp page.

    hi,
    I am badly stuck into this problem.Please help me and find a solution.
    I am using ms-access and jsp.
    my database structure is as given below:
    m_emp_no | from_date | to_date | approver| status |
    1002 | 22/9/2008 | 23/9/2008|1003 |pending
    1004 | 29/9/2008 | 30/9/2008|1003 |pending
    2044 | 15/9/2008 | 16/9/2008|3076 |pending
    now this is exactly a leave apply scenario where a page is displayed and the user has to fill in the details to apply leave.then the approver has to approve that leaves so even, he should get the details in his account.
    for example here 1003 has to approve leaves for 1002 & 1004.i am able to fetch data from database for the particular approver here is the coding:
    <html>
    <body>
    <h2 align="center"><u><b><span style="background-color: #FFFFFF"><font color="#C0C0C0" face="Comic Sans MS">Leave
    Approval Requests</font></span></b></u></h2>
    <form method="POST" name="f1" action="update.jsp">
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:employee_details");
    PreparedStatement p=null;
    p=con.prepareStatement("select * from emp_leave_application where approver='"+username+"'");
    ResultSet r=p.executeQuery();
    while(r.next())
    %>  <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
        <tr>
          <td width="100%" bgcolor="#999966"><b><u><%=r.getString(2)%></u></b></td>
        </tr>
      </table>
      <table border="1" width="100%" height="171" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
        <tr>
          <td width="100%" height="165" valign="top">
            <p align="left"><b>User ID</b>        :
    <input type="text" name="id" value="<%=r.getString(1)%>"  size="4   
         <b>status</b>:<%=r.getString(5)%</p>
    <p><b>Leave From</b> : <%=r.getString(2)%></p>
    <p><b>Leave From</b> : <%=r.getString(3)%></p>
    <p><b>Approve</b> : <select  size="1" name="approved">
            <option value="Approved">Approved</option>
            <option value="Cancelled">Cancelled</option>        </select></p>
    <%
    con.close();
    %>
      <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
              <tr>
                <td width="100%" bgcolor="#999966">
                  <p align="center"><input type="reset" value="Clear" name="B1"> 
                  <input type="submit" value="Submit" name="B2"></td>
              </tr>
            </table>
            </td>
        </tr>
      </table>
    </form>
    </body>
    </html>{code}
    this will display both the rows but when i try to retrieve the values into update.jsp using the code given below it gives me only one value which is the first 1002.
    {code}approved=(String)request.getParameter("approved");
    id=(String)request.getParameter("id");{code}
    but i need both the values to be inserted into the update.jsp only then the approver will be able to approve the leaves individually with respect to the m_emp_no.
    please help me out.
    thanks in advance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    My comments below are all between (((((( and ))))))
    <html>
    <body>
    <h2 align="center"><u><b><span style="background-color: #FFFFFF"><font color="#C0C0C0" face="Comic Sans MS">Leave
    Approval Requests</font></span></b></u></h2>
    <form method="POST" name="f1" action="update.jsp">
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:employee_details");
    PreparedStatement p=null;
    p=con.prepareStatement("select * from emp_leave_application where approver='"+username+"'");
    ResultSet r=p.executeQuery();
    while(r.next())
    %> <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
    <tr>
    <td width="100%" bgcolor="#999966"><b><u><%=r.getString(2)%></u></b></td>
    </tr>
    </table>
    <table border="1" width="100%" height="171" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
    <tr>
    <td width="100%" height="165" valign="top">
    <p align="left"><b>User ID</b> :
    <input type="text" name="id" value="<%=r.getString(1)%>" size="4   
    ((((((( in the statement above, name="id" should be changed to something like name="id"<%=ii%>
    Where ii is a counter that tells you how many times you have gone through the loop so far.
    The reason for this is that each textfield you generate must have a unique name rather than all have the same name
    such as 'id'. This change will give them names such as id0, id1, id2. Then when you submit the page, you can uniquely
    identify each input textfield.))))))
    <b>status</b>:<%=r.getString(5)%</p>
    <p><b>Leave From</b> : <%=r.getString(2)%></p>
    <p><b>Leave From</b> : <%=r.getString(3)%></p>
    <p><b>Approve</b> : <select size="1" name="approved">
    (((( the above select also has to have a unique name for each time through the loop. Change it to name="approved"<%=ii%>
    <option value="Approved">Approved</option>
    <option value="Cancelled">Cancelled</option> </select></p>
    <%
    con.close();
    %>
    <table border="1" width="100%" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF">
    <tr>
    <td width="100%" bgcolor="#999966">
    <p align="center"><input type="reset" value="Clear" name="B1">
    <input type="submit" value="Submit" name="B2"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </form>
    </body>
    </html>
    (((((((note you would be better off long term to put your business logic in a servlet and dispatch to the JSP page which will only have the responsiblity to display the data.
    Also, connection pooling is better than the above.

  • Help needed to include a dynamic member range in report script

    Hi,
    I need to produce the report from Jan to Cur_Mth dynamically. I can include Cur_Mth by using a substitution variable.
    But how to include the months in between Jan and Cur_Mth?
    I tried with Jan:@Cur_Mth but its not working. Any clues will be of great help. Thanks
    Dinish

    onclipevent(load)                                           
    total=_root.getbytestotal();                             
    onclipevent(enterframe)
    loaded=_root.getbytesloaded();
    current=int(loaded/total*100);
    p=""+current+"%";
    if(loaded==total)
    gotoandplay("Scene 2",1);
    sorry for getting the code and coment mixed up.

  • Help needed with attributes losing their values

    Hi there, I have the following code.
    public void actionPerformed(ActionEvent event)
                      // Check to see if Search button pressed
                      if (event.getSource() == searchButton)
                            // Read the isbn and title text fields
                            String supplier = supplierTxtField.getText();
                            String name = nameTxtField.getText();
                            String type = (String)typeBox.getSelectedItem();
                            System.out.println (supplier+" "+name+" "+type);
                            // Display an error message if there is no data in
                            // isbn and/or title text fields
                            if (type.equals(""))
                                JOptionPane.showMessageDialog(frame, "Please enter a product type");
                            if (supplier.equals("") && name.equals(""))
                                  JOptionPane.showMessageDialog(frame,
                                    "Error - you need to enter a supplier and/or item name and item type");
                            else // OK to carry out search
                                  // Search for book(s) based on either the
                                  // isbn or title entered above
                                  System.out.println(supplier+" "+name+" "+type);
                                  searchForItem();
                       //OTHER IRRELEVANT CODE
                 * Search for books.  We can search for books based
                 * upon an ISBN code or title.
                private void searchForItem()
                        // Call the bookSearch() method in DataBaseHandler Class
                        // This method returns a reference to a ResultSet object.
                        System.out.println (supplier+" "+name+" "+type);
                        rs = BellFiresDataBaseHandler.itemSearch(supplier, name, type);
                        // Clear form
                        clearForm();
                        // Set recordCount to 0
                        stockCount = 0;
                        // Display the book details on the form
                        displayItemDetails();
                 }  // End searchForBooks()At the end of actionPerformed, the attributes print out as they should, in this instance the type is Fireplace, the supplier is ABC and the name is null. However, when the same attributes are printed out in the itemSearch method, the values are all null!!! There is nothing that happens in between the two methods and i am completely baffled as to why it does this. It worked fine before i recently changed the input method of the type to JComboBox instead of text field and i had no problems passing through the values.
    If anyone could help me out with this it would be great!
    Thank you!
    Edited by: Chrift on May 24, 2009 10:01 AM

    Ah thank you, so by having the word String in front of the variable names when declaring them i was overriding them and therefore making them local variables.
    I think this is correct, i havent time to test it at the moment so i will declare this question answered when i do!
    Thank you very much :D

Maybe you are looking for

  • How to delete the first page from a large number of documents

    Hello all, My company has migrated from Adobe Acrobat pro 8 to 11. In version 8 we had used Document Processing to remove the first page from all pdf's within a directory (5000+). This process took about an hour. Now my research has led me to use Act

  • How to change the background of a JPanel when printing?

    I have a JPanel that has a background color of gray when displayed on the screen. I would like to change the background to white when printing but leave it gray on the screen. I am calling setBackground(), clearRect() and fillRect() but it still prin

  • Unable to install 3.1 application into 3.0.1.00.07

    Hi everyone, I am trying to import Mr.Kubicek's application into my workspace, but I am getting an error as follows: ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-06550: line 9, column 1: PLS-00306: wrong num

  • App and back up/restore help

    Hi I'm hoping someone can help me with a relatively minor issue I have. My phone was sent away and when I got it back I didn't restore it from my backup straight away because I thought it was going  to have to be sent away again, anyway it didn't and

  • Stupid WMV Files

    Everytime I open a WMV file in Windows Media Player, or even the WMV player provided by Microsoft, it does not work; instead I recieve an error saying "The File Format Is Not Valid", although I am POSITIVE it is. I've tried changing the file format a