Auto-filling a Combo Box

Hi everyone,
I am working on a form using Developer 6, and I have created a list item that is being populated dynamically. The list item is a combo box. I originally used a poplist, but it did not behave the way I intended. I would like to allow the user to be able to type in the letter 'P' and display the first item 'Pan'. Then if the user types in a 'u' after the 'P' they would get another item 'Purse' displayed in the combo box. I have tried using the LIKE% function with no success. Has anyone been successful doing this? If so, what does the code look like? I would appreciate any help you can give me.
Thanks in advance.

It seems as though in my calculation code this line:
if (a=="") event.value = ""
conflicts with this line:
else if(a==0) event.value = "Yes".
I changed the values in my code so that if a>10 it would return a "No" and if a<10 it would return a "Yes" and it worked perfectly. However, when I use the above code (a==0, it just leaves the box blank. I would take out the first line of code (a==""), but I would like the box to be blank until data has been entered into the form.

Similar Messages

  • Fill up combo box

    Hello,
    Is there a way to fill up a combo box that is not by adding line by line with the collection of ValidValues? In VB.Net there is a property call DataBinding that allows to link the combo box with a DataTable, that makes the combo box load immediately.
    What I will like to have is the same combo box that shows when you look for a item inside of a invoice or quote.
    Thanks,
    Yaco

    Yaco
    I believe to achieve that you can ...
    1. Open your form using the Screen Painter and then set the combo box Alias property to the field where the ValidValues are.  Set its DataBound property to true and indicate the Table (same as above indicated in the DBDataSource).  If you can't use the Screen Painter then you will have to do it by code.
    2.  Add a DBDataSource on your form that points to the Invoice or Quote table, like this
      Dim oDS As SAPbouiCOM.DBDataSource
      oDS = oForm.DataSources.DBDataSources.Add(strTableName) 'add your table here, to find out look on the SAP SDK Help Center under Database Table Reference.
       This is done at Load time.
    The next time you run you should see the combo filled with the valid values from the field without you having to indicate them by code.  The field of course must have ValidValues declared.

  • Fill a combo box based on the selection of another combo box

    Hi All,
    I am new to jsp & java script. I have a arraylist of communities and there are 2 combo boxes meant for source community & destination community.
    First user will select Source community , after that I've to remove that community from list and display the option for destination community combo box.
    Here the problem is I am getting the source community value in a java script function - "checkSource() " which I've written at the "onClick" of source community.
    Now java script variable has that community & list of community is a java variable, so I am not able to remove that community from java list.
    Please suggest in the same.
    I've written like this -
    function checkSource()
         var selIndex = document.targetForm.srcgroupname.selectedIndex;
    var srcCommunity = document.targetForm.srcgroupname.options[selIndex].value;
    alert("Selected Src Community-"+srcCommunity);
         <%
         alert("Community length-"+community.size());
         community.remove(community.getIndex( %> srcCommunity <%));
         alert(community.size());
         %>
    But this is not working. community is a java list.
    Please help....
    Thanks in Advance
    Sneha

    Do it with AJAX. Here -> http://www.iem.pw.edu.pl/~opalam/sample/TestAJAX.zip You can download a small, sample project that presents AJAX.
    In the project Servlet, Gson and Jquery is used. When onchange is fired in the first select box a js script method is invoked. This method uses ajax to get the json (gson is used to transfer java objects to json) data from the servlet depending on the value of selected option. When data are obtained the second select box is populated. Of course it might be written better but the general idea is clearly visible which was my goal. Hope this helps.

  • Problems auto-filling a text box

    Hi,
    I am trying to populate a text field with either "Yes" or "No" based on the value placed in another text field. If the value in [textfield 1] is greater than 0, I want a "No" to appear in [text field 2] and if the value of [textfield 1] = 0, I want a "Yes" to appear in [text field 2]. If [textfield 1] is blank, I want [textfield 2] to be blank. I have put the following code into the Custom Calculation area of [textfield 2]:
    var a = this.getField("textfield 1").value;
    if(a=="") event.value = "";
    else if(a>0) event.value = "No";
    else if(a==0) event.value = "Yes";
    Currently if the value from [textfield 1] is greater than 0 a "No" will appear, but the field remains blank if the value of [text field 1] = 0. I'm not sure why this is. This code has worked for me before when the value conditions are different. Is it something to do with the 0?
    I also want some other fields to be visible when [textfield 2] is populated with a "No" in the box and hidden when [text field 2] is populated with a "Yes". This is the code I used in the custom  validation script:
    if (event.value =="Yes") {
         this.getField("textfield 3").display = display.hidden;
         this.getField("checkbox1").display = display.hidden;
    } else if(event.value =="No") {
         this.getField("textfield 3").display = display.hidden;
         this.getField("checkbox1").display = display.hidden;
    Again this code has worked for me for other fields. I'm thinking it doesn't work now because I don't have the Calculation Script working yet?
    Any help would be greatly appreciated. Thanks!

    It seems as though in my calculation code this line:
    if (a=="") event.value = ""
    conflicts with this line:
    else if(a==0) event.value = "Yes".
    I changed the values in my code so that if a>10 it would return a "No" and if a<10 it would return a "Yes" and it worked perfectly. However, when I use the above code (a==0, it just leaves the box blank. I would take out the first line of code (a==""), but I would like the box to be blank until data has been entered into the form.

  • Need Help: I need a check box to auto fill a set value in separate text field.

    Hi, this is my first time with inserting scripts into a PDF Form.
    We have a form that requires the user to check a box regarding medical conditions they have (i.e. Asthma, Diabetes, Hypertension).  Later in the form, they have to type out the same condition into a text box. (I know stupid to double document, but it is required).  Is there a script that will auto fill the text box when they check the box?  For example, if they check asthma, the text box on a later page in the PDF will say "Asthma, controlled."  Is this possible?
    In addition, if they don't click Asthma, and do click Diabetes, could it add Diabetes to the first text box, but if they check both, it would add Asthma to box 1 and Diabetes to box 2?
    Any help would be GREATLY appreciated.
    I'm using Acrobat 9
    Thanks!

    Hi, I'm staring at the code trying to make it work for my needs, which are similar to Austin's.
    I have a 16-page form with 2,988 checkboxes in the entire document (a little over 200 in each page besides the first and last page). The last page contains a textbox labled Summary, and it should provide a summary of all the items checked in the document. Theoretically only one page will be populated at a time, so there will be no more than 200 checkboxes checked in the entire document.
    Is it possible to use the same code? And do I just put the code under the text in the script that reads:
    form1.SummaryPage.SummaryText::calculate - (JavaScript, client)
    The JS I am trying to get to work is the following from a post above.
    // Custom Calculate script
    (function () {
        var i, v, s = "";
        // Loop through the 2988 check boxes
        for (i = 1; i < 2989; i += 1) {
            // Get the value of the current checkbox
            v = getField("checkbox " + i).valueAsString;
            // Concatenate check box value to string if not deselected
            if (v !== "Off") s+= v + "\r";
        // Set this field value
        event.value = s;

  • How to fill combo box with list of all SQL server

    Ok, I know how to find all SQL servers that I need, I have code for that task, and I have Array of all servers.
    My problem is ...
    I made setup project and do a huge work, and in the end this task appear!
    I used ORCA tool to change TextBox (A) template in visual studio (2008 by the way), and I transform first TextBox to ComboBox.
    Now, the little part that I'am missing is how to fill this combo box with a result of my function for listin SQL servers?
    Can I somehow send combobox object to myMethod:
    private void FillCombo(ComboBox cmb)
          // do the job
    or
    instanceOfThisCombo.Items.Add(listOfSQLServers);
    please help me to solve this... thanksc#

    Hi Valerij,
    The ComboBox control in an MSI dialog uses the ComboBox table to populate the items in it. To get what you want, you need to update the ComboBox table in the MSI package with your application and run the MSI package. The following KB article describes how to dynamically populate a ListBox control in Windows Installer:
    http://support.microsoft.com/kb/291329
    This method introduced in the above KB article also applies to populating a ComboBox control in Windows Installer.
    I don't think it's possible to run the application as a Custom Action from within the MSI package because the application will modify the content of the MSI package which is currently running. So you need to launch the MSI package from within your application after updating the ComboBox table. In short, when installing, just run your application which updates the ComboBox table and install the MSI package.
    Hope this helps.
    If you have any question, please feel free to let me know.
    Sincerely,
    Linda Liu

  • When require to fill my name and particulars to an application and the auto fill is displayed and when I click on the auto fill reques turns bleu and refused to auto fill in the document. Your assistance is appreciated.

    When require to fill my name and particulars to an application form or document, thr AutoFill box appears and when directing to auto fill, the message box turns blue and refuses to auto bill. I went to AutoFill in Safari preference but could not find any adjustment to correct the shortcoming. Your assisance is appreciated.

    https://discussions.apple.com/message/23547507#23547507
    This work arround worked for me.. using the icon

  • Creating "Control Combo Box " Relation with data block

    Hi all dears
    i am switching from C# to oracle developer for joining gulf net software house, i have a problem regarding master detail data
    the senerio is
    "List items" control Filled programatically as under shortly:-
    rg_id := create_group_from_query('myrg', 'select dname a, dname b from dept');
    populate_group(rg_id);
    populate_list('mylist', rg_id);
    using this i fill my combo box during new form instance trigger
    i have created a datablock emp through wizard which can show 10 record.
    now
    Problem 1
    i want to show records on form when user select any dept from combo box.
    Problem 2
    if i create group from query and in select statement is like this "select dname, dpetno from dept" the record group is created successfully but i am unable to populate_list due to different data type colums in record group how i will populate list so that List items Labels are department name and value is department no
    Thanks in advance for persual

    Hi dears all
    I have solved this problem my self
    1. select dept name form combo box and the data block shows the emp's of concern depat
    solution
    create a data block of emp table through wizard
    create its table view and show 10 records
    go to datablock i consider its name "emp" datablock properties
    in Where clause condition specify deptno = : my_combo_box;
    now go to combo box when item changed event
    go_bolck("emp);
    execute_query;

  • Error with Combo Box, Executing CBTA Script

    Dear Experts.
    I am Using CBTA in solman 7.1 SP 12 to automate the testing with SAP ERP (SAP GUI) and CRM(CRM UI). We are creating the test script without problem, but at time to execute, it suddenly stop.
    We were checking and found that always is failing with a Combo Box field.
    do you know if exist any note to correct this behavior?
    In CRM UI, the script recording create the following component to fill the combo box
    But in the execution CBTA does not fill the field, just try focus in the field, show the values but does not select any.
    At the end show the following error
    IN SAP ERP
    In ERP, the script recording create the following component to fill the combo box
    But in the execution CBTA does not fill the field, just try focusing in the field show the values but does not select any.
    Then the script execution fail  and show  a error, saying the field is read only.
    Br.
    Juan

    Hi every One.
    Finally i got the solution, the error was that i had set up in SAP GUI the option to view the key in the drop down list and the same happened in CRM UI i had set up the same option.
    After shot down this option we record  the escenario again, then we execute it and run without problem.
    Best regards
    Juan

  • Modify combo box dimension

    Hi,
    How can I modify the combo box (drop down list) dimension in infoview and CMC?
    I have a combo box wich is fill with string values from a LOV.Some strings are larger than the width of the combo box and for that i want to increase the width.
    Anyone knows if this is possible or not?
    And if it is how could be done?
    Thanks
    Best Regards,
    Aurel

    Can you please let me know you fill the combo box with LOV of universe objects?

  • Auto-Suggest feature in Combo-box LOV is not displaying non-unique values

    Hi,
    I have an auto-suggest feature implementation on a combo-box lov that displays the name and email-id of a list of people. There are non-unique names in the back-end, for example :
    Abraham Mason [email protected]
    Abraham Mason [email protected]
    But when I use the auto-suggest feature and type in, say 'Ab', instead of showing both the Abraham Masons the auto-suggest displays only one of the values.
    As in the example above the email-ids of the two Abraham Masons are different and unique.
    If I use the conventional drop down menu of the combo-box then both the values are visible.
    Is the auto-suggest feature implemented in a manner so as to display only unique values?
    This is the implementation of the auto-suggest feature that I have done -
    <af:column headerText="#{bindings.RqmtAtLevel1.hints.Owner.label}"
    id="c23" sortable="true" filterable="true"
    sortProperty="Owner"
    filterFeatures="caseInsensitive">
    <af:inputComboboxListOfValues id="ownerId"
    popupTitle="#{ResourcesGenBundle['Header.SearchandSelect.Searchandselectanobjectusingad']}: #{bindings.RqmtAtLevel1.hints.Owner.label}"
    value="#{row.bindings.Owner.inputValue}"
    model="#{row.bindings.Owner.listOfValuesModel}"
    required="#{bindings.RqmtAtLevel1.hints.Owner.mandatory}"
    columns="#{bindings.RqmtAtLevel1.hints.Owner.displayWidth}"
    shortDesc="#{bindings.RqmtAtLevel1.hints.Owner.tooltip}"
    autoSubmit="true">
    <f:validator binding="#{row.bindings.Owner.validator}"/>
    <af:autoSuggestBehavior suggestedItems="#{row.bindings.Owner.suggestedItems}"/>
    </af:inputComboboxListOfValues>
    </af:column>
    Thanks,
    Anirudh Acharya

    Hi,
    don't find a bug entry about this, so if this indeed is a defect then this has not been filed. Do you have a test case ? If you have please zip it up and send it in a mail to me. My mail address is in my OTN profile (just click on my name until you get to the profile). Pleas rename the "zip" extension to "unzip" and mention the JDeveloper release you work with. The test case should work against the Oracle HR schema.
    If you need to track the issue, I suggest to file a service request with customer support yourself
    Frank

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

  • Adobe Reader app on my ipad air problem with combo boxes filling in

    I am using Adobe Reader app on my ipad air and when filling out forms, and making a selection from a combo box, my selection dissappears.  Not visible, not printable, not savable, just blank.  It works well on my Reader on my Windows desktop.  Any ideas?

    cas ecowater,
    We can examine your PDF forms and determine the cause of the problem.
    Would you send the PDF forms as email attachments to [email protected]?  Please include the link to this forum post (https://forums.adobe.com/thread/1634405) in your email message for reference.
    Thank you.

  • How to auto-fill cell without incrementing it's number (a PO Box)

    I sometimes need to auto fill rows of a person's identifying information which might contain a PO Box number. The PO Box number gets incremented when I copy a single line. Two lines of the same info produce a third with the correct result but if one line is auto filled (with yellow handle) the resulting cell has a box number that is 1 greater than the one above. How can I turn off the incrementing feature? I can copy and paste but would prefer to use auto fill as necessary.

    Hi Charles,
    Thanks for suggestion. I noticed that that problem seems confined to cell with mixed content (text & number- PO Box) but not to number-as-text (zip code). Seems like a coding oversight. I sent a note to Apple. Unlikey that I am only one with problem.
    Happy Thanksgiving.
    Paul Fishman

  • Auto Complete Combo Boxes?

    Does anyone know of auto-completing combo boxes written in Java? I have a dirty hack that sort of works, but if you type too fast the caret jumps to the end of the text it thinks you are typing instead of selecting the characters that you haven't typed yet.
    Any help would be greatly appreciated.

    Jrabi,
    Below is the code for KComboBoxes. Please be aware that this code comes with NO guarantee. It works for me, but that doesn't necessarily mean that it will work for you. If you have any questions about the code I will be happy to answer them. Make sure that once you create an instance of KComboBox that you set it as editable or the auto complete function won't work.
    package pubprint; //make this package whatever your package is
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    * Title: <BR>
    * Description: <BR>
    * Copyright: Copyright (c) 2002<BR>
    * Company: <BR>
    * @author Kevin J. Keen
    * @version 0.5
    public class KComboBox extends JComboBox implements KeyListener {
    private ComboBoxModel myModel;
    private KeySelectionManager myKeyManager;
    private ComboBoxEditor myEditor;
    private JTextField txtEditor;
    private long timeOfLastEvent = 0;
    //Constructors
    public KComboBox() {
    super();
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    public KComboBox(ComboBoxModel daModel) {
    super(daModel);
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    public KComboBox(Object[] items) {
    super(items);
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    public KComboBox(Vector items) {
    super(items);
    myModel = super.getModel();
    myKeyManager = super.getKeySelectionManager();
    myEditor = super.getEditor();
    txtEditor = (JTextField)myEditor.getEditorComponent();
    txtEditor.addKeyListener(this);
    //Key listener methods
    public synchronized void keyReleased(KeyEvent e) {
    if(e.getKeyCode() == KeyEvent.VK_SHIFT || e.getKeyCode() == KeyEvent.VK_TAB) {
    return;
    //This IF/ELSE is necessary because without it
    //you can out-type the auto complete and get
    //really weird behavior.
    if((e.getWhen() - timeOfLastEvent) < 100) {
    return;
    else {
    timeOfLastEvent = e.getWhen();
    String temp = txtEditor.getText();
    int hashCode = temp.hashCode();
    for(int i = 0; i < myModel.getSize(); i++) {
    String contents = (String)myModel.getElementAt(i);
    if(contents.startsWith(temp)) {
    int selectionStart = txtEditor.getCaretPosition();
    int selectionEnd = (contents.length());
    //Check to make sure that the value in the text field hasn't changed
    if(txtEditor.getText().hashCode() == hashCode) {
    setSelectedItem(contents);
    selectedItemChanged();
    txtEditor.setSelectionStart(selectionStart);
    txtEditor.setSelectionEnd(selectionEnd);
    return;
    else {
    return;
    public void keyPressed(KeyEvent e) {}
    public void keyTyped(KeyEvent e) {}
    }

Maybe you are looking for

  • Active Directory provider problem in 11g

    I am having the opposite problem than many others I see setting up Active Directory as the user store for OBIEE 11g. On two of the installations I have done the Active Directory users work but the original weblogic user does not work in OBIEE. It wor

  • How do I view the details of my spotlight results in OSX 10.8?

    Recently upgraded to Mountain Lion from 10.5 I use the spotlight function alot searching .doc and .pdf files for strings of keywords. I am often getting 1000+ results which is fine and correct but my issue is  that in 10.5 there was an info bar at th

  • Special Character not displayed correctly on Japanese OS

    Hi, I have an application build in LabVIEW that I want to install on a Japanese OS but some of the special character are not displayed correctly like °. Is it possible to tell my application to use the US ASCII table to display character? Or I need t

  • Repeating event in an apex calendar

    Hi all, I would like to have a repeating meeting let's say every day from 8 to 10 am what would be the best way to do this in apex calendar ? what I do now is 2 * 5 inserts, one for eacht weekday and one for 8 and one for 9 o'clock is there no betwee

  • System sound (like when empty trash) miserably stop working in Lion 10.7.2

    I have upgraded to Lion10.7.2 on my Macbook Pro early 2008 Intel 15 inches, and the update went fine except one annoying problem I found so far. This problem also occurred in 10.7.0 and 10.7.1 and it seems that no fix has been made in 10.7.2 The prob