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

Similar Messages

  • 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

  • SBO 2005 combo box does not update value at first time

    Hi!I developed an addon for sbo 2004 with a combo box populated with the months of the year, and it works. The same code run on SBO 2005 works only after the second selection. Has anyone found the same problem?

    definition of the item:
    item = form.Items.Add("oMese", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX)
                    item.Left = 245
                    item.Top = 5
                    item.Width = 80
                    item.DisplayDesc = True
                    combo = item.Specific
                    combo.DataBind.SetBound(True, "", "uMese")
                    combo.ValidValues.Add(1, "Gennaio")
                    combo.ValidValues.Add(2, "Febbraio")
    event handling:
    inside ItemEvent in case the item is selected
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
                        Select Case pVal.FormUID
                            Case "PRG_UFM_0002_RegIVAAcq"
                                retCode = oTy_RACQ.FormComboSelect(pVal, BubbleEvent)
      Public Shared Function FormComboSelect(ByVal pVal As SAPbouiCOM.ItemEvent, _
                                               ByRef BubbleEvent As Boolean, _
                                               ByRef funCaller As Object, _
                                               ByVal funCallerID As Integer, _
                                               ByRef aForm As SAPbouiCOM.Form) _
                                               As Integer
            Dim msg As String
            Dim edt As SAPbouiCOM.EditText
            Dim cmb As SAPbouiCOM.ComboBox
            Dim obt As SAPbouiCOM.OptionBtn
            Dim cbx As SAPbouiCOM.CheckBox
            Dim mtx As SAPbouiCOM.Matrix
            Try
                If pVal.Before_Action = True Then
                    Select Case pVal.ItemUID
                        Case "oMese"
                            Dim stre As New strEstremi
                            cmb = aForm.Items.Item("oMese").Specific
                            edt = aForm.Items.Item("anno").Specific
                            If Not cmb.Selected Is Nothing Then
                                GetEstremiPeriod(edt.Value, cmb.Selected.Value, "M", stre)
                                edt = aForm.Items.Item("dtFrom").Specific
                                edt.String = stre.dtFrom
                                edt = aForm.Items.Item("dtTo").Specific
                                edt.String = stre.dtTo
                            End If
    end function
    thank you I hope is enough otherwise please tell me

  • 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

  • Programmatically update Combo box won't update its Local variable

    Hello all,
    I followed a tutorial from NI website and programmatically edit items in a combo box. It worked successfully but not for the Local variables. Local variables still retain items that it had before.
    Any suggestions ?
    Thanks !
    Solved!
    Go to Solution.

    You need to programmatically update the value property in order to change what the local variable will return, the value that you will wire doesn't have to match with one of the Strings[] array.
    Perhaps you need to do something like this to update your value to change from "Two" to "Five".

  • Combo box validation

    Hi all
    I am new to jsp and servlet I have a requirement , in a combo box I don't want to select the default value like
    select I want a client side validation for this.

    I don't fully understand you. Are you talking about JSF? The h:selectOneMenu and h:selectManyMenu both just defaults to an empty item. Clientside validation can only be done with Javascript.

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

  • 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

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

  • Combo Box Won't Update

    I can't get my combo box to change it's list. It always displays the original list. I know that this code is being executed, cause I verified it with the debugger. I can't understand this.
            String[] stringArray = {"Why","Can't","I","Change","You"};
            cboMessageHeader = new javax.swing.JComboBox();
            cboMessageHeader.setModel(new javax.swing.DefaultComboBoxModel(stringArray));I've also tried
            cboMessageHeader = new javax.swing.JComboBox(stringArray );And
            cboMessageHeader = new JComboBox(new EnumComboBoxModel(CANHeader.class));Which is what I really want to do (use the enum to create the list).
    Ahh yes and thanks to anyone who responds to this, i'm pretty frustrated at the moment and help is appreciated,
    Nathan

    Could someone tell me exactly why you can't assign
    cboMessageHeader = new ...
    twice?you can, but the second one is a new instance of JComboBox, and not the one
    you see on the screen.
    to get it to work with the new comboBox, you would have to remove the old one,
    then add back the new one, revalidate the panel, perhaps repaint - overall, messy.
    much easier to just change the combobox's model

  • Need help on combo box validation in jsf

    Hi All,
    I have a combo box with some options. User has to select one option and has to submit the form. If he doesnt select any option and submit the form i need to display an error message saying that PLEASE SELECT AN OPTION AND SUBMIT.
    I am using RATIONAL APPLICATION DEVELOPER 6.0 as my IDE.
    please help me its an urgent requirement

    On submit check if he has an option selected.
    If not do the following:
    FacesContext.getCurrentInstance().addMessage(componentId,
    new FacesMessage(FacesMessage.SEVERITY_ERROR,
    errorMessage,
    errorMessage));
    return null;
    The componentId is the id of the selectOneMenu

  • Combo Box navigation and update

    i need a frame which will popup up the value from database into comboBoxControl and using the navigationBar to navigate the data. But when i click the insert , it will allow me to select the same data from the database. Which item in the property should i set in the conboBoxControl.

    ya Ad,
              This is my code ..........
    oCmb1 = frm.Items.Item("cmb_dept").Specific
                oCmb2 = frm.Items.Item("cmb_mno").Specific
                oCmb3 = frm.Items.Item("cmb_ename").Specific
                oCmb4 = frm.Items.Item("cmb_mtype").Specific
                oCmb5 = frm.Items.Item("cmb_chk").Specific
                oCmb6 = frm.Items.Item("cmb_agy").Specific
                oTxt = frm.Items.Item("t_docno").Specific
                oTxt1 = frm.Items.Item("t_date").Specific
                oTxt2 = frm.Items.Item("t_desc").Specific
                frm.DataSources.UserDataSources.Item("DS_dept").Value = rec.Fields.Item("U_Dept").Value
                frm.DataSources.UserDataSources.Item("DS_mtype").Value = rec.Fields.Item("U_MType").Value
                frm.DataSources.UserDataSources.Item("DS_agy").Value = rec.Fields.Item("U_CAgency").Value
                frm.DataSources.UserDataSources.Item("DS_mno").Value = rec.Fields.Item("U_Mno").Value
                frm.DataSources.UserDataSources.Item("DS_ename").Value = rec.Fields.Item("U_Ename").Value
                frm.DataSources.UserDataSources.Item("DS_chk").Value = rec.Fields.Item("U_Chklst").Value
                frm.DataSources.UserDataSources.Item("DS_dno").Value = rec.Fields.Item("U_DocNo").Value
                frm.DataSources.UserDataSources.Item("DS_date").Value = rec.Fields.Item("U_Date").Value
                frm.DataSources.UserDataSources.Item("DS_desc").Value = rec.Fields.Item("U_Desc").Value
    Regards,
    Anitha

  • 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

  • Value of two combo box is not persistent on change of a third combo box

    Hi All:
    I have flex page in which i have 3 combo boxes. I would be
    selecting first 2 combo box and when i select the third combo box ,
    i would get the value of previous two combo selection and display
    data accordingly.
    My problme here is when i do a change in 3rd combo box the
    values of other combo boxed are defaulted to "Select..." without
    maintaining my previous selection.
    I am stuck in this for a while. I would really appreciate if
    you can help me out in this.
    Thanks
    Kan

    there's a typo.  fix it or remove it:
    var a:Number;
    var b:Number;
    function First(evt:Event):void{
        a = evt.target.value;
    trace(a);
       compareF();
    cbFirst.addEventListener(Event.CHANGE, First);
    function Second(evt:Event):void{
        b = evt.target.value;
        trace(b);
    compareF()
    cbSecond.addEventListener(Event.CHANGE, Second);
    function compareF(){
    If (a > b){
         trace("a is greater")
    else
         trace(b is greater);

  • Populating Database values into a combo box in STRUTS Framework

    Hi Guys,
    I am currently working on a STRUTS Framework project and I can't get much resources related to the problems that I'm facing.
    Currently I need to populate a JSP file's Combo box with database values. What I don't know here is the syntax used to in STRUTS framework to populate the Combo box with database values. Anyone with experience related to this topic, please kindly help me out.

    Struts doesn't define anything about the datab layer. You're free to implement how you will.
    Struts instead guides you into following an MVC pattern.
    You populate a combo box with values from a bean.
    So you need to set up a bean for this page to talk to.
    That bean can be populated from the database - but at that point you're in java/jdbc code - and away from the struts layer.
    My suggestions
    1 - Define a bean to represent the information from the database.
    2 - write a method that queries the database, and copies the data into a List of those beans. This will be your Data access layer.
    3 - in your action, call that method, and then set the list of beans as a request attribute. Or maybe as a property on a form.
    4 - use that list of beans to populate your dropdown box.

Maybe you are looking for

  • When I try to open an email, two (2) "Firefox Document(s)" try to download. How can I stop this?

    I have Window7 64 bit and use Microsoft Outlook 2010 for email. Every time I open an email, two documents try to download. They are each called Firefox Document with very long "names"(?). An example is {86E67A0-2915-4CDA-8941-96A5C9A3FCF8}.hmtl. I ha

  • How to maintain a macbook pro mid 2012's battery life

    Hello, I know that there are a lot of past posts of this, but they still leave me unanswered.  Being a recent windows user, I don't know everything there is to know about macs, however the one thing I do know is how expensive they are, so I want to k

  • Z10 with AMOLED screen

    I read many reviews with just one cons of z10 i.e. battery life. The persons who own z10 cannot change the phone, but how about if blackberry can provides AMOLED screen for z10? Just replace that screen and u get better battary life. Just a thought .

  • Unicode in ecc6.0

    hello, I thought if unicode in attributes is checkd ( ecc6.0) we are not allowed to declare a table with header line but strangely its working fine with occurs 0.plz advise..am I missing something here? Thanks

  • Safari 3.0: How do I force all links to open in tabs without using cmd?

    In a number of other browsers it's easy to set all links to open in tabs. I don't want any separate windows to open and I don't want to have to use the keyboard to force every single link into a tab. How do I get Safari to do strictly tabbed browsing