Question abt. combo box and database

Hi. I have two combo boxes, A and B. Items in A is obtained from table X, Items in B is obtained from table Y. But, the problem is that whatever appears in combo box B should not contain those in combo box A. How do i go about doing this? Note that values in table X come from values in table Y.Here's an example:
(this is I currently have)
Combo X             Combo Y
Apple            Mango
Orange           Kiwi Fruit
Pineapple        Apple
Kiwi Fruit        
Mango          (this is I WANT)
Combo X                  Combo Y
Orange                  Mango
Pineapple               Kiwi Fruit
                        ApplePlease help and thanks in advance.

hi....
First of all, I've designed the two combo boxes with Add/Delete buttons in the GUI. I'm using JSP to retrieve values from database table into my combo boxes.
Actually, I have the two combo boxes already. I have already got the items inserted into combo A from table X using JSP. I am thinking of getting all the values in combo box B from the table Y first, then maybe store them in an array or something, b4 comparing those values with that from combo box A, eliminate those existing in combo box A, and the rest will be stored in combo B.
I do not know exactly how to store values i obtained from table to an array and how to compare arrays.
hope u understand what i'm trying to say, please help if possible, thanks.

Similar Messages

  • Difference between Combo Box and Dropdown List

    Hi All,
    I would like to know the difference between the elements 'Combo box' and 'Dropdown List' in VC. I am facing an issue where i am invoking an entry list and the output of the first element the entry list returns is getting reflected as the output for all the elements...
    So even if 2nd and 3rd row of the o/p from the entry list is giving only 2 items, if the 1st row returns only 1 then we are able to see only 1 item. Its as if the 1st row decides the items to be returned for all the rows.
    Please help.

    Hi Hezi,
    I have 2 columns in my table. First column is 'material number' and the 2nd one is 'production version'. There can 1,2 or 3 production version for each material. [This information is stored in the backend] This is retrieved through a method which invokes a bapi which in turn retrieves from the backend.
    I have provided a dropdown list for the 'production version' column. Lets say there are 2 rows. Material 1 and material 2. Lets say material 1 has 1 production version and material 2 has 2 production version. So rightfully speaking i should have 1 option in the dropdown for material 1 and 2 for material 2.
    But what i seeing is only 1 option for both the materials. This is wrong.
    Is there something that can be done to ensure that each row reflects the correct no. of options in the dropdown?

  • Problem with combo boxes and the reset button in certain situations

    Hi Everyone,
    i have a problem to make the reset-button function properly in an what-if analysis dashboard.
    The dashboard uses two combo boxes that are not visible at the same time. In my application the second combo box only appears when a dedicated menu (label based menu button) has been activated.
    So i have combo box 1 when menu A is active an dand combo box 2 when menu 2 is active.
    After starting the dashboard initial values are fine. If you then directly change to menu 2 (seeing combo box 2 with
    the correct default value) and press the reset button, the dashboard returns to the initial view, showing
    the menu 1 with the correct default value. If you now switch back  to menu 2, you will see, that the combo box 2
    is empty (i.e. nothing selected).
    I also tracked the destination cells for the combo box value results as well as the source cells for the "selected item" and the
    destination cells for the "Insert Selected Item". All this values seem to be correct. Therefore i assume that
    this is an issue of event handling. Maybe the combo box 2 does not refresh its selected value because it is already
    invisible when the values are restored.
    This case can easily be simulated by placing two combo boxes and a push button (that changes the visibility of
    the combo boxes) and the reset button on the canvas.
    Maybe someone can help. I am able to provide a test xlf, if neccessary.
    Thanks,
    Oliver
    P.S. I am using Xcelsius SP4 (Version 5.4.0.0)

    Hello Debjit_Singha_86,
    thank you for your support. At the moment i have the following setting:
    label based menu
    - General: Insertion Type "value" from a list of ID's for the menu-items to a dedicated cell (current menu ID, say tab1!$A$1)
    - Behavior: Selected item (position) fixted to item 1
    hidden combo box
    - General: Insertion Type "position" to a dedicated cell with the current choice (say tab1!$B$1)
    - Behavior: Selected item (position) to the same cell (tab1!$B$1)
    Can you give me a hint on how to connect the two components according to your solution, so that the label based menu sets the default for the hidden combox box only in case, that the reset button is pressed?
    Thanks,
    Oliver

  • Jump To Record in Combo Box and Poplist

    Hello,
    I have created a demo Form to show how to create a Jump-to feature for Combo Boxes and Poplists. In the combo box the user enters a character and it automatically jumps to the first entry starting with that character. With the poplist, the user enters text in a text box and it jumps to that entry in the poplist. Please add your email if you want me to send you a demo.
    If anyone knows how to clear the text highlighting in a field (the opposite of Select_all) let me know. I can't find a workable solution (aside from using PJCs which we haven't figured out how to do yet).
    ~Rob

    Rob i would like to send me the demo. Thanx in advance. My e-mail is [email protected]
    Regards,
    Bill...

  • HOWTO Get the text of "combo box" and "labe" controls with JavaAccessBridge

    HOWTO Get the text of "combo box" and "labe" controls with JavaAccessBridge.
    Please help,
    I'm trying to use the Java Access Bridge (JAB) 2.1 to get the text in Java Applet controls. I've been able to use the sample code in AccessInfo.cpp sample that comes with JAB to get text from "text" controls in a Java Applet. To clarify, I am referring to the "role" in the AccessibleContextInfo struct being set to "text" or "combo box" or "label".
    The problem is, when I use the AccessInfo.cpp sample to get text from a "combo box", the accessibleText data member comes back as FALSE, and thus any of the JAB text functions like GetAccessibleTextInfo fail to get any text information from "combo box" or "label" controls.
    I've also tried GetCurrentAccessibleValueFromContext on the "combo box" and "label" controls, but the text returned is empty.
    Can anyone help?

    I have new information in regards to this issue. A contact from Sun did get to me in email and relayed that that "label" objects store their text in the "name" data member of the AccessibleContext structure. This was a big help.
    But I'm still stuck trying to get information from "combo box" and other controls, like "push button". The contact said, the Java Access Bridge does not provide all the information because it is already implemented by other interfaces like AccessibleComponent, AccessibleAction, or AccessibleSelection. The contact did not allude to whether these opther interfaces can be used along side the Java Access Bridge or not. So, I'm left a step closer to the goal, but still stuck without the full solution.
    Can one take the Java Access Bridge functions, like say those used in the Ferret sample, and close the gap to get text back from "combo box", "push button", and other controls by using some other API in conjunction?

  • A simple question about combo box

    Dear All,
    Just got a simple question about combo box: I have one of these selectors with labels based on filtered rows from a table.
    Is it possible to have one more label that would select all options?
    Like:
    Product A
    Product B
    Product C
    All Product
    Many thanks for your help!
    Gilles

    Hi Gilles,
    The purpose of ComboBox itself to select single option out of many.
    For your purpose, you may have to use "List Builder" which can accomodate 1 or more  to select.
    Please revert for more clarification if you need.
    With best wishes
    BaaRaa.

  • Embedded Fonts a Combo Box and complete madness

    I have a combo box that has an array of fonts loaded into
    them, not here is my problem. For some reason, when i select the
    fonts in the array, some of them change and some of them dont. I
    have created font symbols like instructed in the live docs, but i
    dont get why they arent showing up..
    i.e. I have 7 fonts loaded into this combo box and i can
    select Arial Bold and my text field will show the text in arial
    bold, but when i select hobo, i get some substitute!
    here's my code, maybe you guys will see something i
    haven't.. the fonts in particular i am having trouble with: Bookman
    Old Style, BrushScript and Hobo.

    there are many points/issues here. here are some:
    1. Your array called fonts contains eight strings such as
    'new Arial()', whereas i think what you were trying to achieve here
    is to create references to the fonts in the library. to do this
    remove the quotation marks.
    2. To be able to create references to the fonts in the
    library, ensure that the font symbols in the library contain class
    names, with base classes of flash.text.Font. do this by selecting
    'Linkage' on your library fonts.
    3. Ensure that your text field is set to embed fonts - either
    in authoring, or with actionscript
    eg.outputTB1.embedFonts=true;
    4. you set up fonts_array with eight font names and then in
    your for loop, you again add eight fonts to this array. this is
    redundant.
    5. in the for loop you have the line: fonts_array.push(new
    String(fonts[ i]));
    this appears to be an attempt at converting a reference to a
    font into a font name. this isn't going to work. if you had set up
    references to fonts to begin with (see point 1), and this line
    wasn't redundant (see point 4), you would extract the font name
    like so: fonts_array.push(fonts[ i].fontName)
    6. maintaining two arrays of fonts is unecessary. i would
    recommend just maintain your fonts array with references to fonts,
    and extract font names from these references. this would look
    something like the code attached below.
    7. One last thing - i notice that you have at least two of
    your fonts - arial and arial bold, probably have different
    formatting. if some are bold and some are not, you will need to
    specify the bold property also. eg. font.bold=true

  • I need help. When i open combo box and click window redrawing (flickering)

    hi,
    I am developing HTML desktop app using adobe AIR.
    Thought i can use it like browser page. Its not able to handle all jquery ,bootstrap etc.
    So removed all . just created a simple form with static combo box with many values.
    When i opened combo box and selected value whole screen redrawing( you can see it flicker). Annoying as hell.
    When i click button or type in input field its not happening.
    Anyone have clue?. I tried this same page in TideSDK ( its not flickering there).
    But i am gona go with AIR because of update feature but i need to get rid of flickering issue before i go any further.
    Anyone here done HTML form in adobe air?
    Please help. I am having headache all day on this issue.
    Advanced Thanks .

    I meant flickering means...when i open combobox and click focus is going out of air window as though combobox is in some another window. once click press mouse down...focus is in combo box but window loses focus and once releases mouse ..window back to focus.  Kinda annoying effect when u try to click on combo box and select.
    Tested with html scout sample app and load any webpage with combobox , window loses focus.
    But any combobox made using EXT it do not flicker because ext handles focus event correctly.
    My windows has set of combo box and user always select different value from combo box if keep losing focus and coming back its annoying as hell.

  • **urgent*** -two  combo boxes  -one  database table - ***urgent**

    1. i have one html page - in that two combo boxes are there
    2. first one called--> Bank Name and second one called-->Main Branch
    3. i have a database table like BANK_MASTER(MAIN_BRANCH,BANK_NAME)
    i am giving here some data for the above table:
    (sbi-kurnool, sbi),(sbi-cadapah,sbi),(sbi-chittor,sbi),(ab-rangareddy,ab),(ab-varangal,ab) ..like that every bank has its own main branch in different location.
    MY PROBLEM:
    In HTML page, in the first combo box ie., Bank Name will display all the bank name using the table BANK_MASTER ie.,sbi,ab,cb,sbh ...... (its ok - i too get )
    main Problem: Whenever i select a particular bank name in the first combo box, the second combo box ie.,Main Branch has to display the main branches using the table Bank_Master depending on the Selected bank name from the Bank Name Combo box ( ie., if we select the sbi, it has to display all main branches of sbi's only, but not other bank's main branches)

    Hi friend,
    I had a similar situation and i tried to solve it by using XmlHttpRequest Object(used in AJAX).
    U can checkout the below example just for further reference delete
    UserForm.jsp:
    ==========
    <head>
    <script>
    var xmlHttp
    function showState(str)
    xmlHttp=GetXmlHttpObject()
    if (xmlHttp==null)
    alert ("Browser does not support HTTP Request")
    return
    var url="getState.jsp"
    url=url+"?count="+str
    url=url+"&sid="+Math.random()
    xmlHttp.onreadystatechange=stateChange
    xmlHttp.open("GET",url,true)
    xmlHttp.send(null)
    function stateChange()
    if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
    document.getElementById("state").innerHTML=xmlHttp.responseText
    </head>
    <body>
    <select name='country' onchange="showState(this.value)">
    <option value='india>india</option>
    </select>
    <br>
    <div id='state'>
    <select name='state' >
    <option value='-1'>pickone</option>
    </select>
    </div>
    </body>       
    getState.jsp
    ============
    <%@page language="java" import ="java.util.Hashtable" import ="java.util.Set" %>
    <%
    String country=request.getParameter("count");
    response.setContentType("text/html");
    response.setHeader("Cache-Control","no-cache");
    try{
    Hashtable ht = (Hashtable)session.getAttribute("<ATTRIBUTE_NAME>");
    String buffer="<select name='state'><option value='-1'>Pick One</option>";
    Set s=ht.keySet();
    Object keys[]=s.toArray();
    int size=keys.length;
    for(int i=0; i < size;i++){
    buffer=buffer+"<option value='"+ht.get(keys).toString()+"'>"+ht.get(keys).toString()+"</option>";
    buffer=buffer+"</select>";
    response.getWriter().println(buffer);
    catch(Exception exp){
    response.getWriter().println(exp);
    %> I think u may go upon replacing country with your Main Branch and vice versa

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

  • Fill combo box  fro database using jsf

    dear all,
    i am new to JSF and i want to fill a JSF combo box from a database
    can anyone help me ??
    thanks in advance for help

    use this tag inside  <h:selectCombobox>
    <f:selectItems value="#{myBean.valueArrayFromDB}"/>

  • Display issue with Combo Boxes and Logo

    Hi All,
    I am facing a couple of issues with my dashboard:
    1. Combo boxes display - I have placed a series of combo boxes one below the other. During the preview, when I click on the first combo box, the values spread below. That is, the labels, and options of the next combo box are also visible. The options in the combo box are not seen clearly. I have tried many permutations and combinations with "Bring Forward +" and "Send Back -" but none of them seem to work. For example, keeping the first combo as bring forward and next one as send back etc. Can you please help me in this regard?
    2. Logo - I have used image component and embedded a logo from my local system. Later I saved the xlf in the repository. When I import the xlf from the platform, it displays the logo fine. But however, this behavior is not constant. It sometimes doesn't show the image. Do I have to save the image also in the repository? or in a common shared folder? If I embed the logo does it not mean that the xlf hold the copy?
    Any help in this regards is highly appreciated.
    Thanks and regards,
    Sandeep.

    Hi:
       For your question
    1) Do you need your combox overlapped? I tried to overlap my comb box and preview it, seems works fine for me. it only chooses the first comb box. But I am suggesting that if you want to show/hide the different combox in the same position at run time, you can try to control the visibility by some other component.
    2) The answer is NO, the image embedded in the image component will be saved to xlf file, there is no need to save it individually. Try to clean your cache files in your machine and do it again.
    Hope it helps.

  • COMBO BOXES AND SOME PAGES ARE NOT SHOWN CORRECTLY IN SOME WEBSITES LIKE SBICAPSEC AND MAXNEWYORK LIFE. BUT NO PROBLEM USING WITH IEXPLORER

    I am not able to login to maxnewyork life insurance site while using firefox. I am using firefox 3.6.10 now. Combo boxes are not shown in the some trading websites. I uses noscript2.0.3.3, javaconsol6.0.21, javascript option 1.2.6 and WOT20100908. It creates feeling of inferiority in using Firefox due to these problems.

    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • Question on Combo Box

    I have a form with Master (Single Record ) and Detail ( Multi Record ) blocks. There is a Combo Box in Header block. When I select a value from Combo box ( When list changed ) detail block records are to re queried. Similarly when I enter some value manulally and by pressing tab/enter key ( Key Next Item) , the detail records are to re queried.
    While entering a value with Key board, the trigger When-List-Changed trigger is firing for each letter I'm typing. Is there any work around solution for this?

    Quote:I think it will be nice to close the editor if we click again on the down arrow or the cell without selecting any item in the combobox, so that users can see original cell view
    Your opinion collides with the opinion of other users that say they want to keep the combobox active to see what is underneath the open dropdown to open it again.
    Adding your code to the iconCanvas in NatCombo breaks the behavior on clicking the down arrow. At least in my workspace. I don't know of which version we are talking about and which codebase you have. But hideDropDownControl() does not close the editor, it only hides the dropdown. This can't be the solution.
    What you need is to override mouseDown() to close the editor instead of hiding it.
    BTW, with this change you remove the ability to move the focus to the text control to allow editing.

  • Use Combo Boxes and Datepart "m" and "y" to filter forms and reports

    I am trying to build a Form to filter through Sales Order Records going back up to four years to find purchasing patterns of  customers and to find more potential sales.  I am using a simple main form, with 2 subforms joined on the Sales Representative
    [accntrep], one which show current orders for a given month and the other orders from past months and years.  I've got 3 combo boxes, 1 to select sales representative, 1 to select a month using date part and 1 to select a month.  This would be very
    flexible in easily searching any month in any year of the recordset.  I know I will be using something like "DatePart("m",[Date])=2 And Year([Date])=Year(Date())-4" (Feb 2011) to filter my records, but I am having troubling writing
    the procedure just right.  I am using 2-column combo boxes 1 column for text i.e (April, May, June etc.) and a second for the Date Part Expression.  I think I need to concatenate the values into the filter, but I cannot come up with exactly how to
    get this done.  Any ideas??
    Thanks,
    js

    If there is any doubt in your mind then I  will suggest a sanity debug trick; temporarily add 2 textboxes
    in T1 put its control source: =ComboBoxNameMonth
    in T2 put its control source: =ComboBoxNameYear
    don't put what I typed - put in their actual control names for those 2 comboboxes
    this way you can see what is actually the value of those combo boxes... depending on what they are bound to - those values may not be what you are expecting them to be.....obviously alter the properties of the comboboxes until they have the values they should
    Am a little unclear on filtering your records in regard to how the data is not structured whether for example: Nov 2015 is in 2 separate fields or a single field like 11/2015 or what - not sure it is a true date field or possibly a text field...so
    the next part of this depends on the data structure.

Maybe you are looking for