Combo select value

I have a problem with comobox select. I have build a form with 3 comboboxes. I added to the form a button for clear all the controls values in the form. When I am in the find mode nad i want to clear the combobox selected value it does not clear the value. and this is only when I am in find mode.
I have also added the empty value to the combo datasource.
the code is something like this:
oCombo.Select(string.Empty, SAPbouiCOM.BoSearchKey.psk_ByValue);
string selectedValue = _cmbCausale.Selected.Value;
The problem is that  when I am in find mode the selectedValue it is not string.Empty but it is the last selected value from the form.
does any one have any suggestion?

HI,
Set the datasource value to clear the combobox, then it will work.
Regards
J.

Similar Messages

  • How can we pass selected combo box value to a jsp pag?

    Hi All,
    I want to pass selected combo box value to a same jsp page's variable.
    i am using javascript
    <select onchange="this.options[this.selectedIndex].text">
    </select>
    this selected value should be invoked for a jsp page's variable.
    Excepting for favorable reply
    Vansh

    select2.jsp
    <script>
    function x()
         alert(document.f.s.options[document.f.s.selectedIndex].text);
         document.f.submit();
    </script>
    <body>
    <form method="get" name="f" action="select2.jsp">
    <select name="s" onchange="x()">
    <option checked>--select--</option>
    <option value="1"> vijay </option>
    <option value="2"> kumar </option>
    </select>
    </form>
    </body>

  • How to get the current selected value of a combo box or a option button?

    Hello All,
    I want to catch the current selected value of a combo box and also of a option button and want save it into different variables in my code. These option button and combo box are in a SAP business one form which I have created through VB dot.net coding.
    But I don't know how to do that, can any one send any example code for this.
    Regards,
    Sudeshna.

    Hi Sudesha,
    If you want to get the selected values you can do it as follows: The Combo Box value you can get from the combo box. If you want to get it on the change event, you must make sure that you check when BeforeAction = False. If you want to get an Option Button value you should check the value in the data source attached to the option button.
            Dim oForm As SAPbouiCOM.Form
            Dim oCombo As SAPbouiCOM.ComboBox
            Dim oData As SAPbouiCOM.UserDataSource
            oForm = oApplication.Forms.Item("MyForm")
            oCombo = oForm.Items.Item("myComboUID")
            oApplication.MessageBox(oCombo.Selected.Value)
            oData = oForm.DataSources.UserDataSources.Item("MyDataSourceName")
            oApplication.MessageBox(oData.ValueEx)
    Hope it helps,
    Adele

  • Selecting combo box value

    Hi,
    I want a code in jsp or javascript for selecting combo box value and it is assigned to another variable.
    Example: If combo box value is Number, it is assigned to 0. If como box value is Name, it is assigned to 1.

    hey thanks for the info hunter...but it is related to core java..actually im workin on jsp,html n stuff..so any help on tht would be refreshing..
    vinay

  • Getting the last selected value of the combo  - very very urgent...........

    On my panel i have a jcombobox in upper half(which displays say the address type.) and few text fields on the lower half(which displays the add details). when the user selects a value in the combo box the text fields are populated based on the selection. The user can change the values displayed in the text fields. So before setting the new values in the text fields the last displayed values need to be saved.
    I have an ActionListener for my combo which gives me the currently selected value by calling getSelecetdItem()
    How can i get the last selcted value of the combobox without using any variable of my own.

    To update the last displayed details(the address details say) i need to check what type of address the combo had previousely.....
    when i display the panel first time the home address is set by default and i have a variable to hold this value..as the user changes the selection i update the variable...I don't want to use this variable..instead if i can get the last selcted value from the event that would be great...
    thanks

  • How to clear the selected values in the JCombobox

    Hi All,
    Can you please tell - how to clear the selected values in the JCombobox
    I have four dropdowns in my application, When I click "CLEAR" button, what ever the values selected in the four drop downs should go off and view as "SELECT" in all the dropdowns.

    In addition to the above you should also check out [Combo Box Prompt|http://www.camick.com/java/blog.html?name=combo-box-prompt] which makes it easy to display the default prompt.

  • Problem while setting the selected value of h:selectOneMenu to bean

    Hi all,
    I am new to JSF. I am working on application where i have combo boxe on the page. I am setting some values to the combobox from database using <f:selectItems> tag and one value using <f:selectItem> tag. The value combobox value selected by user is set to the bean property which is String. I am able to display all the values in the combobox but when clicked on button (present at the end of form) i am getting following error-
    ERROR HtmlRendererUtils:354 - Error finding Converter for
    component with id interviewStageOneForm:acceptanceChannelList
    I am setting the combobox selected value to the to the bean property which is String and the value selected in also String. Then which converter it is asking for. I am not able to find out what is the problem.
    Your suggestions will be really appreciated.
    Here is my code snippet:-
    JSF:-
    <h:selectOneMenu id="acceptanceChannelList"
         value="#{interviewStageOneBean.index}">
         <f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
         <f:selectItems value="#{MasterDataBean.acceptanceChannelList}" />  <!-- The list coming from database-->
    </h:selectOneMenu>Bean:-
    public class InterviewStageOneBean {
         private String index;
         public String getIndex() {
              return index;
         public void setIndex(String index) {
              this.index = index;
    }

    Hi!
    First I would try next:
    Try to leave out
    <f:selectItem itemValue="Select" itemLabel="#{Message.combo_select}" />
    line. And check if it works after that. If it didn't repeat step but you leave in message selectItem and dump out database selectItem line.
    Second:
    I would check acceptanceChannelList creation and what type of objects you put while doing setValue and setLabel on UISelectItem
    Probably selectItem value has been assigned an object of type the engine doesn't know how to convert from String to it.

  • Combo box in JavaScript and store the combo box values into database

    i am a developer, i have a task ie.. i have combo box in JavaScript and i have to store the combo box values into database through JavaServerPage..
    i please every one to have a look on this and please reply soon....

    dear sir,
    your suggestions are really greater the god.............
    i have applied as you said , now i am the page as updated and also i nform you that its multi select ....
    i will show the codings , then u will get a clear identification
    <script language= "JavaScript">
    <!--
    function one2two() {
        m1len = m1.length ;
        for ( i=0; i<m1len ; i++){
            if (m1.options.selected == true ) {
    m2len = m2.length;
    m2.options[m2len]= new Option(m1.options[i].text);
    for ( i = (m1len -1); i>=0; i--){
    if (m1.options[i].selected == true ) {
    m1.options[i] = null;
    function two2one() {
    m2len = m2.length ;
    for ( i=0; i<m2len ; i++){
    if (m2.options[i].selected == true ) {
    m1len = m1.length;
    m1.options[m1len]= new Option(m2.options[i].text);
    for ( i=(m2len-1); i>=0; i--) {
    if (m2.options[i].selected == true ) {
    m2.options[i] = null;
    //-->
    </script>
    <form method="POST" name="theForm" action="update.jsp">
    <table bgcolor="white" border="1" cellpadding="5" cellspacing="2" align="center">
    <tr><td align="center">
    <select id=menu1 size=10 multiple>
    <option>javascript</option>
    <option>php</option>
    <option>Zeo</option>
    <option>asp</option>
    <option>jsp</option>
    <option>ajax</option>
    <option>struts</option>
    </select>
    <p align="center"><input type="button" onClick="one2two()" value=" >> "></p>
    </td><td align="center">
    Languages you know:<BR>
    <SELECT NAME="language" multiple>
    <OPTION VALUE="c">C
    <OPTION VALUE="c++">C++
    </SELECT>
    <p align="center"><input type="button" onClick="two2one()" value=" << " ></p>
    </td></tr></table>
    <center><input type="submit" value="update"></center>
    </form>
    <h4><u>Back<h4>
    <script language= "JavaScript">
    var m1 = document.theForm.menu1;
    var m2 = document.theForm.language;
    </script>
    </body>
    </html>

  • Problem  in Combo Select

    Hi,
    In my form i have a combo. My requirement is, for example i load 5 data A,B,C,D,E in combo. First i select the 'A' and load the corresponding elements in the matrix, next i select 'B' and the corresponding elements of 'B'  was loaded in matrix now again i select 'A ' it should check 'A' is already selected and the corresponding elements are already displayed in matrix again the elements of 'A' should not be loaded in matrix. Plz tell how to check this.
    Thanks in Advance.
    Regards,
    Madhavi

    Hi Madhavi,
    here are the main parts of my little example.
    Some hints:
    The form is managed in a shared class (only one form at a time)
    The Matrix is loaded via a DataTable
    The Matrix is ReLoaded on every time the "ABCDE-Combo" is selected (except the value is already selected)
    In the example I load Businesspartners into matrix where their CardName starts with A or B or....or E (you must adapt it for your needs)
    SboCon.SboDI is the SAPbobsCOM.Company
    SboCon.SboUI is the SAPbouiCOM.Application
    Some global vars (initialize them somewhere when the form is opened!):
        Private Shared oForm As SAPbouiCOM.Form
        Private Shared oUds As SAPbouiCOM.UserDataSources
        Private Shared oDts As SAPbouiCOM.DataTables
        Private Shared oDtBp As SAPbouiCOM.DataTable
        Private Shared oMtxBp As SAPbouiCOM.Matrix
        Private Shared SelVals As System.Collections.ArrayList ' The values of the combo which already selected by the user
    Init the vars somewhere (where you normally do this) on form load:
                oForm = '...set it in your way
                oDts = oForm.DataSources.DataTables
                oUds = oForm.DataSources.UserDataSources
                oMtxBp = oForm.Items.Item("MTX_BP").Specific
               ' DataBinding and related:
                '### Data Tables
                oDts.Add("DT_BP")
                '### UserDataSources
                '# ABCDE Combo:
                oUds.Add("UDS_SELBP", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100)
                oForm.Items.Item("CBX_SELBP").Specific.databind.setbound(True, "", "UDS_SELBP")
                '### Fill ABCDE Combo
                oForm.Items.Item("CBX_SELBP").DisplayDesc = True
                oCbx = oForm.Items.Item("CBX_SELBP").Specific
                oCbx.ValidValues.Add("0", "Please select...")
                For val As Integer = Asc("A") To Asc("E")
                    oCbx.ValidValues.Add(Chr(val), "Load " & Chr(val) & " BP")
                Next
                oUds.Item("UDS_SELBP").ValueEx = "0"
    The Combo Select Event:
                If pVal.ItemUID = "CBX_SELBP" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_COMBO_SELECT Then
                    If Not pVal.BeforeAction Then
                        If oUds.Item("UDS_SELBP").ValueEx != "0" Then
                            Dim oCbx As SAPbouiCOM.ComboBox = oForm.Items.Item("CBX_SELBP").Specific
                            If SelVals.Contains(oUds.Item("UDS_SELBP").ValueEx) Then
                                ' BP already selected - do nothing
                                SboCon.SboUI.StatusBar.SetText("Already selected!")
                            Else
                                If Not SelVals.Contains(oUds.Item("UDS_SELBP").ValueEx) Then
                                    SelVals.Add(oUds.Item("UDS_SELBP").ValueEx)
                                End If
                                Dim query As String
                                oDtBp.Clear()
                                oMtxBp.Clear()
                                ' Build query for BPs where their names starts with the Combo-Value
                                query = "SELECT CardCode, CardName FROM OCRD WHERE "
                                For i As Int16 = 0 To SelVals.Count - 1
                                    If i > 0 Then query &= " OR "
                                    query &= "CardName LIKE '" & SelVals(i) & "%' "
                                Next
                                query &= " ORDER BY CardName"
                                ' load the MTX via DataTable (reloaded every time based on collected combo-values)
                                oDtBp.ExecuteQuery(query)
                                With oMtxBp.Columns
                                    ' Zeilen-Nr.
                                    .Item("0").DataBind.Bind("DT_BP", "CardCode")
                                    .Item("1").DataBind.Bind("DT_BP", "CardName")
                                End With
                                oMtxBp.LoadFromDataSource()
                                oMtxBp.AutoResizeColumns()
                                SboCon.SboUI.StatusBar.SetText(oUds.Item("UDS_SELBP").ValueEx & " added!", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success)
                            End If
                            ' reset Combo to "Please select..."
                            oUds.Item("UDS_SELBP").ValueEx = 0
                        End If
                    End If
                End If
    ATTENTION: REPLACE the "!=" with less (<)/greater(>) symbol, they're not shown in ths forum
    I hope I didn't forget sth. - here it works..
    Cheers,
    Roland
    Edited by: Roland Toschek on Sep 25, 2008 11:54 AM

  • I want to select value in combox  based on another combox in matrix

    Please answer frequently

    Hi
    You van use the follwing code.
      Case BoEventTypes.et_COMBO_SELECT
                                If pVal.ItemUID = "Matrix" And pVal.ColUID = "Combo" Then
                                    Dim oCombo, oCombo1 As SAPbouiCOM.ComboBox
                                    Dim oMatrix As SAPbouiCOM.Matrix
                                    oMatrix = Me.m_SBO_Form.Items.Item("Matrix").Specific
                                    oCombo = oMatrix.Columns.Item("Combo").Cells.Item(pVal.Row).Specific
                                    oCombo1 = oMatrix.Columns.Item("Combo1").Cells.Item(pVal.Row).Specific
                                    If oCombo.Selected.Value = "Value" Then
                                        oCombo1.Select("Value1", BoSearchKey.psk_ByValue)
                                    End If
                                End If
    Regards
    Rupinder

  • How to set condition in choose from list based on the combo selection

    Dear Members,
         i have a requirement to filter the item based on the itemgroup. After choosing the itemgroup in the dropdown list i have to filter the item for the particular group in the choose from the list.since i have tried in the combo select it doesnt work out for me.any body can suggest me is it doable. if so pls tell me the work around.
    My coding is as follows..
    Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
    if pval.itemUID="Cmb"
                                objChooseCollection = objForm.ChooseFromLists
                                objChooseFromList = objChooseCollection.Item("CFL1")
                                objConditions = objChooseFromList.GetConditions()
                                objcondition = objConditions.Add()
                                objcondition.Alias = "itmsgrpcod"
                                objcondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                                objcondition.CondVal = Form.items.item("Cmb").specific.selected.value
                                objChooseFromList.SetConditions(objConditions)
    End if
    With Regards,
    jai.
    Edited by: JaiShankarRaman on Dec 23, 2009 10:47 AM

    Hello,
    Following is a code sample which I am using:
            Dim oForm As SAPbouiCOM.Form
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oChooseFromList As SAPbouiCOM.ChooseFromList
            Dim oConditions As SAPbouiCOM.Conditions
            Dim oCondition As SAPbouiCOM.Condition
            Dim CodeType As Integer
            Try
                oForm = oPayOn.SBO_Application.Forms.GetForm(CflEvent.FormTypeEx, CflEvent.FormTypeCount)
                oMatrix = oForm.Items.Item("AC_MATRIX").Specific
                oChooseFromList = oForm.ChooseFromLists.Item("ACC_CFL1")
                CodeType = oMatrix.Columns.Item("AC_MC00").Cells.Item(CflEvent.Row).Specific.Selected.Value
                oConditions = oChooseFromList.GetConditions
                If oConditions.Count > 0 Then
                    oCondition = oConditions.Item(0)
                Else
                    oCondition = oConditions.Add
                End If
                oCondition.Alias = "U_CodeType"
                oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
                oCondition.CondVal = CodeType
                oChooseFromList.SetConditions(oConditions)
            Catch ex As Exception
                'oPayOn.SBO_Application.SetStatusBarMessage(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
            End Try
        End Sub
    I am calling this in the CFL event - before action. So when the user clicks on CFL button - but before it opens - this code is called and the condition is applied. Here AC_MC00 is a combo column in a matrix.
    Regards
    Rahul Jain

  • Combo Select in Matrix

    Hi to all,
    I have a problem in combo Select in Matrix. I have a form with A matrix and One Column as a combobox. This Column is bind to one of the field of Table.
    I have loaded the combo with valid values, but when i select the combo item, it is not set in that column, i.e No value.
    regards
    Bikram

    Hi,
    Have you added a row to the matrix after initialisation of the column with the valid value ? if not add a row to the matrix. Check the below code
    SAPbouiCOM.Matrix oMatrix = null;
    SAPbobsCOM.Recordset oRecordset = null;
    LoadFromXML("frmLMM.srf");
    Global.oForm = Global.SboApplication.Forms.Item("frmLMM");
    oRecordset = (SAPbobsCOM.Recordset)(Global.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));
    oRecordset.DoQuery("select UnitDisply,UnitName from owgt");
    oRecordset.MoveFirst();
    oMatrix = (SAPbouiCOM.Matrix)(Global.SboApplication.Forms.Item("frmLMM").Items.Item("MtrxSrvc").Specific);
    for (int i = 0; i < oRecordset.RecordCount; i++)
                       oMatrix.Columns.Item("colUom").ValidValues.Add(oRecordset.Fields.Item("UnitDisply").Value.ToString(),
                       oRecordset.Fields.Item("UnitName").Value.ToString());
                        oRecordset.MoveNext();
    oMatrix.AddRow();
    Regards,
    Noor

  • When combo selected, user form sholud be open

    Hi
    In system form, when value is selected in the combo box, at same time  user form should be opened. what is the coding for this process? can anyone help me..
    Regards
    Bhuvana

    Hi Bhuvana
    in the combo select event use this code to get your User form to load
    LoadFromXML("solution.srf")(Name of the srf file)
    oform = oapp.Forms.Item("solut")(FormUID)
      service_solution() (databinding)
    this is an easy way to load a form the for this use should have LoadFromXml() function like this
    Public Sub LoadFromXML(ByVal FileName As String)
            Dim oXmlDoc As New Xml.XmlDocument
            Dim sPath As String
            Try
    sPath = IO.Directory.GetParent(Application.StartupPath).ToString
                oXmlDoc.Load(sPath & "\" & FileName)
                oapp.LoadBatchActions(oXmlDoc.InnerXml)
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
        End Sub
    if this helps do reward points
    Edited by: Cool Ice on Jul 28, 2008 12:44 PM

  • ADF  Get selected values from Dynamic Lists

    Hi,
    I have a created a dropdown list box where the list gets value through a managed bean. On commit I want the selected value to be saved into the CardiacV1EchoSched column of the Entity object (database). The source looks like this.
    <af:selectOneChoice value="#{bindings.CardiacV1EchoSched.inputValue}"
    label="#{bindings.CardiacV1EchoSched.label}"
    valuePassThru="true">
    <f:selectItems value="#{TTrack.carScheList}"/>
    </af:selectOneChoice>
    The problem is that getCardiacV1EchoSched() in the entity object class is null. The selected value does not get passed into #{bindings.CardiacV1EchoSched.inputValue} at all. If I bind the value to a variable in managed bean I get the selected value.
    Thanks in advance,

    Hi,
    not sure which business service you use to update the database, but if you use ADF Business Components then you need to call the commit operation
    Frank

  • Error while attaching document to report on Portal - Invalid selection valu

    Hello All,
    We are running our reports on Portal and as per the business requirement the users have to create comments or attach documents to certain amounts in certain columns and once they create the comment a document icon shows up near that amount (for example there are 3 columns Budget, actual, balance then the user have to create comment for some amounts which needs explanation) they do that from context menu  Documents -> Create new Comment.
    Now we want those documents to be saved on Infoprovider level and not on master data for any particular object. We have activated the flag "Characteristic is document property" on related infoobjects. We have the flag to display document icon on Infoprovider active in the web template. Now when I run the report I am able to create new comments on first two columns and when the report refreshes it shows me icon near that amount but it gives me errors on third column after the report refreshes itself. Now when I go in portal KM repository where documents are stored I do see the document that I created for the third column as well so looks like the document is getting created and being stored but the issue is when it tries to display the icon on that third column.
    The error I get is this:
    The initial exception that caused the request to fail was:
    Invalid selection value:  AttributeMember
    com.sap.ip.bi.bics.dataaccess.resource.impl.bi.exceptions.BicsResourceBwRuntimeException: Invalid selection value:  AttributeMember
    at com.sap.ip.bi.bics.dataaccess.resource.impl.bi.selector.selection.ProviderRange.setLowForced(ProviderRange.java:297)
    at com.sap.ip.bi.bics.dataaccess.resource.impl.bi.selector.selection.ProviderRange.setLow(ProviderRange.java:291)
    at com.sap.ip.bi.bics.dataaccess.resource.impl.bi.selector.selection.ProviderRange.set(ProviderRange.java:469)
    at com.sap.ip.bi.bics.dataaccess.consumer.impl.selector.selection.SingleMember.set(SingleMember.java:125)
    at com.sap.ip.bi.km.common.assignment.AssignmentMember.isContained(AssignmentMember.java:192)
    Please give some inputs if anyone is facing same problem or is anyone has worked previously with this kinda of stuff.
    Thanks in advance.
    Kiran

    Hi!
    Have you solved this problem? I have the same problem after a SPS implementation (SPS 17). The message appears when we select a single value in a DP (hierarchical filter item) that filters another one, but when I select a node it doesn't.
    Before the patch implementation the apliccation worked ok.
    Any idea?
    Thanks in advance.
    Jose

Maybe you are looking for

  • IPod Gen 5 (late 2006), 30GB, Black, will not sync with prior iTunes or current

         I have an iPod, Gen 5 (late 2006), 30GB, Black, I had kept unopened for a while (purchased in 2007 and opened it in 2008-09). I retrieved the iPod Gen 5, opened, and did sync it with my PC-Windows 7, one (1) time. I uploaded my music and it work

  • New HDD Test and SMART Errors

    I have two brand new Samsung Spinpoint F3 HD103SJ 1TB harddisks.  To check the drives before using them, I ran `badblocks -b4096 -w -s -v` on both drives.  No errors. I then checked `smartctl -a` The first disk has the following entry: 191 G-Sense_Er

  • My wifi don't work

    Dear Mrs          my computer is the least type :macbook air MD761ZP/A  .   Nowing, my wifi don't work :  My wifi performance at work sometimes connected, sometimes disconnected great impact speed.    I require that the least wifi update 1.0 !

  • Blocking sales of a Particular material to customer

    One way to block the sales of a particular material to the customer is through Material Listing/Exclusion, is there any other standard functionality available?

  • HTTP:RMI EJB Unable to create InterfaceType: com.evermind...SubordinateXA..

    Hi, I have deployed some ADF BC as EJB to oc4j1013 and want to access them using the HTTP tunnel. It works perfectly within JDEV 1) Calling EJB withing JDEV with RMI 2) Calling EJB within JDEV through HTTP:ORMI 3) Calling EJB with RMI as JClient Web