Add ChooseFromList

Hi,
I added
How to add the choosefromlist in the  purchaseorder form of the sap.

Hi,
FMS is formatted search.  u need to PRESS SHIFTALTF2 and a window appears in which u can assgn a query to have the same functionality as a CFL. For more information on FMS search in the SAP Business One Core forum.
OR tell me ur exact requirement i'll try to guide u
Hope it helps,
Vasu Natari.

Similar Messages

  • Add ChooseFromList to UDF on System Matrix

    Hi Everyone
    I would like to know if it is possible to add a choosefromlist to a UDF on a system matrix. I keep and getting an error "The item is not a user-defined item"
    Has anypone be able to achieve this???
    Thanks in advance

    Thanks Frank.
    I have done so already. I made a button on the form the size of a dot, not visible and so on. I then link it to a choose from list. Then i catch the needed event and then through code initiate a click on the button.
    Could you please check my thread on FormDataEvent on SBO 2005 SP01 P04
    Thanks for the response

  • How to add ChooseFromList in the Grid!!

    I would like to know how to add a ChooseFromList in the Grid. I am using SAP B1 2005 and to program in VB.Net.

    Hi Carlos... In order to set the ChooseFromList UID and alias you need to convert the GridColumn into an EditTextColummn.
    Like this (C#)
    oGrid.Columns.Item("UID").Type = BoGridColumnType.gct_EditText;
    EditTextColumn editCol = (EditTextColumn)oGrid.Columns.Item("UID"));
    editCol.ChooseFromListUID = "UID";
    editCol.ChooseFromListAlias = "Alias";
    Hope it helps

  • How To Add ChooseFromList to UDO Default Form

    Dear All,
    I have one problem in UDO's (Master Data Type). I created  one default form it's working fine but i want to add choosefrom list to this form how to add it is system created form.Please give me you suggestions.
    thanks
    MadhuGanji

    C:\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\17.ChooseFromList

  • Problen in ChooseFromList & User Defined Object

    Hello.
    I'm trying to use a [ChooseFromList] that calls info from one User Table called @LABS this table is MasterData type.
    I add a User Defined Object in runtime, called UO_Labs
    Then, I add one ChooseFromList to my form (This form was made in ScreenPainter)
    The user object was created fine, the ChooseFromList is added fine, the form loads fine, but, when I press tab or the button of the ChooseFromList I get this error: "Internal error (-1003) ocurred [Message 131-183]"
    I try to use my ChooseFromList in one Matrix and in one EditText objects. And gives me the same error in both objects.
    I'm using SAP 2007 PL 35
    This is my code:
    Adding the User Defined Object -
    Dim UO As SAPbobsCOM.UserObjectsMD
    UO = CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
    UO.ManageSeries = SAPbobsCOM.BoYesNoEnum.tNO
    UO.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
    UO.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
    UO.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
    UO.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
    UO.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
    UO.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO
    UO.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
    UO.Code = "UO_Labs"
    UO.Name = "Laboratory Info."
    UO.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData
    UO.TableName = "LABS"
    If UO.FormColumns.Count = 0 Then UO.FormColumns.Add()
    UO.FormColumns.SonNumber = 0
    UO.FormColumns.FormColumnAlias = "Code"
    UO.FormColumns.FormColumnDescription = "Code"
    UO.FormColumns.Add()
    UO.FormColumns.SonNumber = 0
    UO.FormColumns.FormColumnAlias = "Name"
    UO.FormColumns.FormColumnDescription = "Name"
    If UO.Add() <> 0 Then
          Application.MessageBox(CompanyObj.GetLastErrorDescription)
    End If
    END Adding the User Defined Object -
    This code adds my UDO and it works fine, has data and do the work.
    Adding the [ChooseFromList] Object -
    '// form object is send in parameters.
    Dim oCFLs As SAPbouiCOM.ChooseFromListCollection = f.ChooseFromLists
    Dim oCFL As SAPbouiCOM.ChooseFromList
    Dim oCFL_CP As SAPbouiCOM.ChooseFromListCreationParams
    Dim matrix As SAPbouiCOM.Matrix = form.Items.Item("matrix").Specific
    oCFL_CP = App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
    oCFL_CP.MultiSelection = False
    oCFL_CP.ObjectType = "UO_Labs"
    oCFL_CP.UniqueID = "cfl_Labs"
    oCFL = oCFLs.Add(oCFL_CP)
    matrix.Columns.Item("labCode").ChooseFromListUID = "cfl_Labs"
    matris.Columns.Item("labCode").ChooseFromListAlias = "Code"
    form.Refresh()
    END Adding the [ChooseFromList] Object -
    Thanks for your time...
    Greetings
    Gabriel Vasquez.

    Hi Gabriel,
    Please check in B1 if the UDO is created correctly, specifically the CanFind option. I got that error once, with one of my addons, that somehow was created with CanFind=tNo, despite my code indication CanFind=tYes...
    Also, try adding the CFL directly in the XML form.
       <column uid="C_labCod" type="116" title="Lab. Code" description="Laboratory Code" visible="1" AffectsFormMode="1" width="70" disp_desc="1" editable="1" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1" ChooseFromListUID="cfl_Labs" ChooseFromListAlias="Code">
          <databind databound="1" table="@LABS" alias="U_labCode"></databind>
          <ExtendedObject linkedObject="" LinkedObjectType=""></ExtendedObject>
       </column>
       <ChooseFromListCollection>
          <action type="add">
             <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"></ChooseFromList>
             <ChooseFromList UniqueID="cfl_Labs" ObjectType="UO_Labs" MultiSelection="0" IsSystem="0"></ChooseFromList>
          </action>
       </ChooseFromListCollection>
    Also, it's a good practice to your SAP partner's NameSpace as prefix to UDOs, UDTs, UDFs and UDKeys, in order to avoid conflicts with other partner's add-ons.
    Regards,
    Vítor Vieira

  • Problem with ChooseFromList on UDO

    Hi, I have a UDO form that works well except for one small issue.  I have an EditText that is tied to a field in the UDO table for the B1 Item Code.  This field saves, loads and navigates fine, but when adding a new UDO record, I need to have the user pop up a ChooseFromList to see a list of the B1 items.  The only problem is that this edit text is already bound to the UDO table/field and therefore the Choosefrom list isn't able to automatically populate the edit text like it normally would when the field is bound to a user datasource. 
    What is the preferred way to have a UDO field bound to an edit text box on the UDO to also work with a ChoosefromList?
    I just wanted to ask before I spend time programming a work-around to code the choosefromlist value into the edit text myself.
    Thanks!

    Hi Curtis,
    Have you tried to create a CFL and asign it to your edit text (linked to a DB Datasource)? I have tried it and it works fine, it works for UDS and also for DBDS.
        'Add EditText to the form for User Object
        oItem = oForm.Items.Add("EdTxtUO", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oItem.Left = 105
        oItem.Top = 50
        oItem.Width = 100
        oEdit = oItem.Specific
        'Link DBDS to EditText
        'oEdit.DataBind.SetBound(True, "", "ET_UDS_UO")
        Dim etDDSuo As SAPbouiCOM.DBDataSource
        etDDSuo = oForm.DataSources.DBDataSources.Add("@T_MD")
        oEdit.DataBind.SetBound(True, "@T_MD", "Code")
        ' Add ChooseFromList for EditText to the form
         oCFLCPuo = SB1_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
        oCFLCPuo.ObjectType = "TT_MD"
        oCFLCPuo.UniqueID = "UserObjectCFL"
        oCFLuo = oForm.ChooseFromLists.Add(oCFLCPuo)
        'Link CFL to EditText
        oEdit.ChooseFromListUID = "UserObjectCFL"
        oEdit.ChooseFromListAlias = "Code"
    Regards
    Trinidad.

  • ChooseFromList in XML

    Hi!
    I have read that it's possible to add a <ChooseFromLists> Node into a XML formated form in order to create chooseFromList objects.
    But when I load the form (by the AddEx method) with this node I get an error message: "XML - Invalid Tag".
    Do you know if it is really possible? I'd like to see a sample.
    Thank you.

    Here is a sample of XML that I use to have an Item Master Data Choose from List
    Note that it only works with 2005A, and not 2004
    this XML should be added on the same level node than
    <items>
         <action type="add">
         <action/>
    <items/>
    <ChooseFromListCollection>
         <action type="add">
              <ChooseFromList UniqueID="CFLPN_1" ObjectType="4" MultiSelection="0" IsSystem="0">
                   <conditions>
                        <condition bracket_open_num="1" bracket_close_num="1" cond_end_val="" cond_value="I" operation="1" relationship="0" compare_fields="0" alias="ItemType" compared_field_alias=""/>
                   </conditions>
              </ChooseFromList>
              <ChooseFromList UniqueID="CFLPN_2" ObjectType="4" MultiSelection="0" IsSystem="0">
                   <conditions>
                        <condition bracket_open_num="1" bracket_close_num="1" cond_end_val="" cond_value="I" operation="1" relationship="0" compare_fields="0" alias="ItemType" compared_field_alias=""/>
                   </conditions>
              </ChooseFromList>
         </action>
    </ChooseFromListCollection>
    Then to have it on a edit text :
    <item AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" enabled="0" font_size="0" forecolor="-1" from_pane="0" height="14" left="118" linkto="" right_just="0" supp_zeros="0" tab_order="0" text_style="0" to_pane="0" top="43" type="16" uid="txPN" visible="1" width="137">
         <AutoManagedAttribute/>
         <specific  ChooseFromListUID="CFLPN_1" ChooseFromListAlias="ItemCode">
              <databind alias="itemCode" databound="1" table="OINS"/>
         </specific>
    </item>
    Or on a column in a matrix
    <column AffectsFormMode="1" backcolor="-1" description="" disp_desc="0" editable="1" font_size="0" forecolor="-1" right_just="0" text_style="0" title="Operator Code" type="116" uid="col1" val_off="N" val_on="Y" visible="1" width="80" ChooseFromListUID="CFLPN_2" ChooseFromListAlias="ItemCode">
         <databind alias="US_OP_C" databound="1" table=""/>
    </column>

  • Object Type 10 donu00B4t showed in CFL

    Hi all,
    I have a problem with cfl over OCRG (object type 10)
    My code in .srf file is the following:
    <userdatasources>
    <action type="add">
        <datasource uid="udsCliente" type="9" size="254"></datasource>
        <datasource uid="udsCadena" type="1"></datasource>
    </action>
    </userdatasources>
    <item uid="txCliente" ....>
        <AutoManagedAttribute></AutoManagedAttribute>
        <specific TabOrder="0" ChooseFromListUID="cflOCRD" 
                                      ChooseFromListAlias="CardName">
             <databind databound="1" table="" alias="udsCliente"></databind>
         </specific>
    </item>
    <item uid="txCadena" type="16" ....>
        <AutoManagedAttribute></AutoManagedAttribute>
        <specific TabOrder="1" ChooseFromListUID="cflOCRG"  
                                          ChooseFromListAlias="GroupCode">
            <databind databound="1" table="" alias="udsCadena"></databind>
        </specific>
    </item>
    <ChooseFromListCollection><action type="add">
          <ChooseFromList UniqueID="cflOCRD" ObjectType="2" MultiSelection="0" IsSystem="0"></ChooseFromList>
          <ChooseFromList UniqueID="cflOCRG" ObjectType="10" MultiSelection="0" IsSystem="0"></ChooseFromList>
    </action>
    </ChooseFromListCollection>
    Note: In txcliente a cfl works fine (over bussinessPartners), however in txCadena (over BussinesPartner Groups not showed)
    What I´m wrong? (It´s seems a type of udsCadena... i´m trying with several types but still wrong)
    Thanks in advanced and Kinds Regards

    Hi Alejandro,
    I have tried to give it a try and cannot make it work.
    As this object is new maybe there is something missing on it that blocks the CFL from working.
    Please create a message for support asking for it. And if you can share your findings in here.
    Best Regards
    Trinidad.

  • How to Open multiple form with only one screen painter file

    Hi all ,
    I want to reopen the form without closing the active form ,i want to use same srf file ..
    I have already try it but form already exist error occur .
    pl help me , how to do it ?
    how to open multiple form with same srf file without closing active forms .
    thanks in advance,
    msw

    <?xml version="1.0" encoding="utf-16" ?>
    <Application>
      <forms>
        <action type="add">
          <form appformnumber="-1" FormType="-1" type="0" BorderStyle="0" uid="BOE" title="Bill of Entry" visible="1" default_button="1" pane="0" color="0" left="365" top="62" width="801" height="410" client_width="785" client_height="372" AutoManaged="1" SupportedModes="15" ObjectType="">
            <datasources>
              <dbdatasources>
                <action type="add">            
                </action>
              </dbdatasources>
              <userdatasources>
                <action type="add"/>
              </userdatasources>
            </datasources>
            <Menus>
              <action type="enable">
                <Menu uid="1282"/>
              </action>
              <action type="disable">
                <Menu uid="5890"/>
              </action>
            </Menus>
            <items>
            </items>
            <ChooseFromListCollection>
              <action type="add">
                <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"/>          
              </action>
            </ChooseFromListCollection>
            <DataBrowser/>
            <Settings Enabled="0" MatrixUID="" EnableRowFormat="1"/>
          </form>
          <form appformnumber="-1" FormType="-1" type="0" BorderStyle="0" uid="BOE1" title="Bill of Entry" visible="1" default_button="1" pane="0" color="0" left="365" top="62" width="801" height="410" client_width="785" client_height="372" AutoManaged="1" SupportedModes="15" ObjectType="">
            <datasources>
              <dbdatasources>
                <action type="add">
                </action>
              </dbdatasources>
              <userdatasources>
                <action type="add"/>
              </userdatasources>
            </datasources>
            <Menus>
              <action type="enable">
                <Menu uid="1282"/>
              </action>
              <action type="disable">
                <Menu uid="5890"/>
              </action>
            </Menus>
            <items>
            </items>
            <ChooseFromListCollection>
              <action type="add">
                <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1"/>
              </action>
            </ChooseFromListCollection>
            <DataBrowser/>
            <Settings Enabled="0" MatrixUID="" EnableRowFormat="1"/>
          </form>
        </action>
      </forms>
    </Application>

  • Can i create a matrix

    hi friends
    i have a doubt . can i create two cfl in the same form? if so how?
    thanks and regards
    Manoj Nagaraj

    Hi,
    Yes, you can create more CFLs with own UniqueID on the same form.
    In manage item event handler you can filter by uid of CFL.
    An example of CFLs on Clients Orders form:
    <ChooseFromListCollection>
      <action type="add">
        <ChooseFromList UniqueID="-1" ObjectType="17" MultiSelection="0" IsSystem="1" />
        <ChooseFromList UniqueID="1" ObjectType="73" MultiSelection="0" IsSystem="1" />
        <ChooseFromList UniqueID="10" ObjectType="1" MultiSelection="0" IsSystem="1" />
        <ChooseFromList UniqueID="11" ObjectType="1" MultiSelection="0" IsSystem="1" />
        <ChooseFromList UniqueID="12" ObjectType="17" MultiSelection="0" IsSystem="1" />
      </action>
    </ChooseFromListCollection>
    It is possible to find many examples by searching on SDK forum for words "CFL" or "ChooseFromList".
    When you create form call this function to add cfls
    Private Function AddChooseFromList(ByRef oForm As SAPbouiCOM.Form) As Boolean
      Dim b As Boolean = True
      Try
        Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
        Dim oCons As SAPbouiCOM.Conditions
        Dim oCon As SAPbouiCOM.Condition
        oCFLs = oForm.ChooseFromLists
        Dim oCFL As SAPbouiCOM.ChooseFromList
        Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
        oCFLCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
        ' Agent CFL
        oCFLCreationParams.MultiSelection = False
        oCFLCreationParams.ObjectType = 53
        ' Agent Code
        oCFLCreationParams.UniqueID = "cflACode"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' Agent Name
        oCFLCreationParams.UniqueID = "cflAName"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' Agent: Button CFL
        oCFLCreationParams.UniqueID = "cflAButt"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' Business Partner CFL
        oCFLCreationParams.MultiSelection = False
        oCFLCreationParams.ObjectType = 2
        ' BP Code
        oCFLCreationParams.UniqueID = "cflBPCode"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' BP Name
        oCFLCreationParams.UniqueID = "cflBPName"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
        ' BP Button for CFL
        oCFLCreationParams.UniqueID = "cflBPButt"
        oCFL = oCFLs.Add(oCFLCreationParams)
        oCons = oCFL.GetConditions()
        oCon = oCons.Add()
      Catch ex As Exception
        b = False
        ' log exception
      Finally
        System.GC.Collect() 'Release the handle to the table
      End Try
      Return b
    End Function
    If you about CFL on matrix... in manage Item event check CFL UniqueID...
    Case BoEventTypes.et_CHOOSE_FROM_LIST
      If Not pVal.BeforeAction _
      And (pVal.ColUID = "colICode" Or pVal.ColUID = "colIName") Then
        Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
        oCFLEvento = pVal
        Dim sChooseFromListUID As String
        sChooseFromListUID = oCFLEvento.ChooseFromListUID
        Dim oChooseFromList As SAPbouiCOM.ChooseFromList
        oChooseFromList = oForm.ChooseFromLists.Item(sChooseFromListUID)
        Dim oDataTable As SAPbouiCOM.DataTable
        oDataTable = oCFLEvento.SelectedObjects
        Dim sCode As String = ""
        Dim sName As String = ""
        Try
          sCode = oDataTable.GetValue(0, 0)
          sName = oDataTable.GetValue(1, 0)
        Catch ex As Exception
          ' log exception
          sCode = ""
          sName = ""
        End Try
        If Not sCode.Equals("") Then
          ' IF MATRIX COLUMN
          ' Update Matrix Row:
          '    1) oForm to have oMatrix object;
          '    2) row, to know where are need to be writed the Code & Name values.
          b = MatrixUpdateCell(oForm, pVal.Row, sCode, sName)
          ' IF DBDATASOURCES
         oForm.DataSources.DBDataSources.Item("USER_TABLE").SetValue("Code", 0, sCode)
         oForm.DataSources.DBDataSources.Item("USER_TABLE").SetValue("Name", 0, sName)
        End If
      End If
    Or search DK forum for "CFL matrix" words.
    Also look this
    Case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST
      If Not pVal.BeforeAction Then
        Try
          oForm.Freeze(True)
          Dim oCFLEvento As SAPbouiCOM.IChooseFromListEvent
          oCFLEvento = pVal
          Dim sCFL_UID As String
          sCFL_UID = oCFLEvento.ChooseFromListUID
          Select Case sCFL_UID
         Case "cfl1"
           Dim oCFL As SAPbouiCOM.ChooseFromList
           oCFL = oForm.ChooseFromLists.Item(sCFL_UID)
           If oCFLEvento.BeforeAction = False Then
             Dim oDataTable As SAPbouiCOM.DataTable
             oDataTable = oCFLEvento.SelectedObjects
             Dim valCode As String = ""
             Dim valName As String = ""
             Try
               valCode = oDataTable.GetValue(0, 0)
               valName = oDataTable.GetValue(1, 0)
             Catch ex As Exception
               ' log exception
             End Try
             Try
              If (pVal.ItemUID = "eBPCode") Or (pVal.ItemUID = "bCFL1") Then
                ' for userdatasource
                oForm.DataSources.UserDataSources.Item("uCardName").ValueEx = valName
                ' for dbdatasource
                oForm.DataSources.DBDataSources.Item("USER_DEF_TABLE").SetValue("U_DEFINED_FIELD", 0, valCode)
                ' form to update mode
                oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
              End If
             Catch ex As Exception
              Dim s As String = ex.Message
             End Try
           End If
         Case "cfl2"
           ' do something
         Case "cfl3"
           ' do something
          End Select
        Catch ex As Exception
          ' log exception
        Finally
          oForm.Freeze(False)
        End Try
      End If
    Hope I help you.
    Regards
    Sierdnas
    Edited by: Sierdna S on Jul 17, 2008 12:04 PM

  • UDO MasterData and Deails Data

    Hi,
    I've a UDO linked with a custom form designed with Screen Painter. In order to add a new record I press CTRL+A keys so the Form's Mode is changed to fm_ADD_MODE.
    Ok!
    On the custom form I've a EDIT field where I should write manually an Item Code. But If I don't know that code, I would like to search it through an Items list (for example writing the * (asterisk) on that field I would like to show the form which allow me to look for the Item code).
    How can I do this?
    Thanks in advance.
    Piero

    Hi Piero,
    If you want to display a list like in B1 then you have to create a UDO containing this list of records.
    After that you only have to use the ChooseFromList object, new in the 2005 version.
    Here you have a sample on how to use it:
    ' Add ChooseFromList to the form
    oCFLCPuo = SB1_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
    oCFLCPuo.ObjectType = "TTT_UDOMD" 'Code of your UDO containing the list
    oCFLCPuo.UniqueID = "NM_UOCFL" 'String that you fix
    oCFLuo = oForm.ChooseFromLists.Add(oCFLCPuo)
    'Add your EditText to the form as usual   
    oItem = oForm.Items.Add("EdTxtUO", SAPbouiCOM.BoFormItemTypes.it_EDIT)
    oItem.Left = 50
    oItem.Top = 50
    oEdit = oItem.Specific
    'Bind your EditText as you need (here UDS for example)
    oEdit.DataBind.SetBound(True, "", "ET_UDS_UO")
    'Link CFL to EditText
    oEdit.ChooseFromListUID = "NM_UOCFL"
    oEdit.ChooseFromListAlias = "Code"
    Don't forget to listen the event et_CHOOSE_FROM_LIST and copy the value selected into the DataSource of your EditText:
    oForm.DataSources.UserDataSources.Item("ET_UDS_UO").Value = eventCFL.SelectedObjects.GetValue(0, 0)
    Hope it helps
    Trinidad.

  • SDK Sample Code

    Hi,
    I have tested a form from B1DE as given in elearning.
    I have used VB.net and repeated all steps with this tool
    and I can Find,Add, update data in my form without any problem
    Now my question are
    1) In VB.Net there are no components i.e. UI Interface
    2) How can I add ChooseFromList to a specific field
    Please Help
    Best Regards,
    Umer Nasim Mirza

    Hi Umer,
    This is the way to add a CFL :
    1. Define your CFLs :
    Here i create a CFL with conditions :
    private void AddChooseFromList(SAPbouiCOM.Form myForm)
                try
                    SAPbouiCOM.ChooseFromListCollection oCFLs;
                    SAPbouiCOM.Conditions oCons;
                    SAPbouiCOM.Condition oCon;
                    oCFLs = myForm.ChooseFromLists;
                    SAPbouiCOM.ChooseFromList oCFL;
                    SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams;
                    oCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);
                    oCFLCreationParams.MultiSelection = false;
                    oCFLCreationParams.ObjectType = "2";
                    oCFLCreationParams.UniqueID = "IFC_CFL";
                    oCFL = oCFLs.Add(oCFLCreationParams);
                    oCons = oCFL.GetConditions();
                    oCon = oCons.Add();
                    oCon.BracketOpenNum = 2;
                    oCon.Alias = "CardType";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    oCon.CondVal = "S";
                    oCon.BracketCloseNum = 1;
                    oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
                    oCon = oCons.Add();
                    oCon.BracketOpenNum = 1;
                    oCon.Alias = "GroupCode";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    oCon.CondVal = return_GroupNum("Auteur");
                    oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
                    oCon = oCons.Add();
                    oCon.Alias = "GroupCode";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    oCon.CondVal = return_GroupNum("Editeur");
                    oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
                    oCon = oCons.Add();
                    oCon.Alias = "GroupCode";
                    oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                    oCon.CondVal = return_GroupNum("Traducteur");
                    oCon.BracketCloseNum = 2;
                    oCFL.SetConditions(oCons);             
                catch (Exception ex)
    //Catch Error
    2. Affect your CFL to a specific field :
    oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("3").Specific;
                    oEdit.ChooseFromListUID = "IFC_CFL";
                    oEdit.ChooseFromListAlias = "CardCode";
    Hope it's help you
    Regards
    Michael

  • How to add more than 1 condition to ChooseFromList???

    Anyone can help??? how to add multiple conditions to one ChooseFromList??? i have my code here, but it doesn't work, can anyone help???
    Code:
    Dim SplitStr() As String
    Dim i As Integer
    SplitStr = Split(Cond_Val, ",")
    For i = 0 To UBound(SplitStr)
      oCons = oCFL.GetConditions()
      If Not oCons.Count > 0 Then                     
        oCon = oCons.Add()
      End If
      oCon.BracketOpenNum = UBound(SplitStr) + 1
      oCon.Alias = "Code"
      oCon.Operation = co_EQUAL
      oCon.CondVal = SplitStr(i)
      oCon.BracketCloseNum = i + 1
      If i <> UBound(SplitStr) Then
        oCon.Relationship = cr_AND
      End If
    Next
    oCFL.SetConditions(oCons)

    Hi Lee,
    Try to use SQL profiler to see what SQL query gets executed. Your code seems fine. Try it manually before working with the arrays. Here's an example of code I know works:
    Dim oCfl As SAPbouiCOM.ChooseFromList
    Dim oConditions As SAPbouiCOM.Conditions
    Dim oCondition As SAPbouiCOM.ConditionoCfl = oForm.ChooseFromLists.Item("cfl_ePmt")
    oConditions = oApplication.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_Conditions)
    oCondition = oConditions.Add
    oCondition.BracketOpenNum = 2
    oCondition.Alias = "CardCode"
    oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
    oCondition.CondVal = sCode
    oCondition.BracketCloseNum = 1
    oCondition.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND
    oCondition = oConditions.Add
    oCondition.BracketOpenNum = 1
    oCondition.Alias = "Canceled"
    oCondition.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL
    oCondition.CondVal = "N"
    oCondition.BracketCloseNum = 2
    oCfl.SetConditions(oConditions)
    Hope it helps,
    Adele

  • Condition ChooseFromList doesn't work

    Hi
    On the AP Invoice Form i added to the ChooseFromList a new condition. This works with the following code fine.
    SAPbouiCOM.ChooseFromListCollection cflc = parentForm.ChooseFromLists;
    SAPbouiCOM.ChooseFromList cfl = cflc.Item("2");
    SAPbouiCOM.Conditions conds = cfl.GetConditions();
    SAPbouiCOM.Condition cond = conds.Add();
    cond.Alias = "ISRBillID";
    cond.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
    cond.CondVal = "1234";
    cfl.SetConditions(conds);
    This ChoosFromList give me all BusinessPartners with ISRBillID back.
    When i want all BusinessPartners with no ISRBillID, it doesn't work.
    SAPbouiCOM.ChooseFromListCollection cflc = parentForm.ChooseFromLists;
    SAPbouiCOM.ChooseFromList cfl = cflc.Item("2");
    SAPbouiCOM.Conditions conds = cfl.GetConditions();
    SAPbouiCOM.Condition cond = conds.Add();
    cond.Alias = "ISRBillID";
    cond.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
    cond.CondVal = "";
    cfl.SetConditions(conds);
    Does anybody have an idea?

    Ok, reworded...
    How i represent following SQL-Statement to a Condition?
    SELECT CardCode, CardName, ISRBillID FROM OCRD WHERE ISRBillID IS NULL

  • Error when trying top connect ChooseFromList object to a Button object

    Hi all
    I have a user form with a button .
    upon pressing on the button i want that a ChooseFromList screen will be opened. when i create the ChooseFromList object and bind it to the button object by assigning its UID to the button's ChooseFromListUID property i recieve an error message that says: "Invalid choose from list".
    what could be causuing this problem? what is the correct way in code to connect a ChooseFromList object to a Button object?
    appreciate the help
    Yoav

    Hi Yoav,
    Before Doing the Bind, you should add your CFL
    Dim oCFLs As SAPbouiCOM.ChooseFromListCollection
    Dim oCFL As SAPbouiCOM.ChooseFromList
            Dim oCFLCreationParams As SAPbouiCOM.ChooseFromListCreationParams
    oCFLs = oFrm.ChooseFromLists
                oCFLCreationParams = SBO_App.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams)
                '1. BP CFL
                oCFLCreationParams.MultiSelection = False
                oCFLCreationParams.ObjectType = SAPbobsCOM.BoObjectTypes.oBusinessPartners
                oCFLCreationParams.UniqueID = cflName
                oCFL = oCFLs.Add(oCFLCreationParams)
    The correct way to connect a CFL to a button is like this
    Dim oBtn As SAPbouiCOM.Button
    oBtn = oFrm.Items.Item("btnCFL").Specific
    oBtn.ChooseFromListUID = cflName

Maybe you are looking for

  • Pages from OSX Server - Slow and impossible

    Is anyone using Pages 08 in an office setting with OSX Tiger Server? We are an office with only 5 users and trying to migrate from AppleWorks to Pages '08. The speed at which Pages '08 saves and opens files from our server is terrible... documents ta

  • Windows 7 and Acrobat from an XP computer

    I  have had a desktop with Windows XP OS and now have switched to a desktop with Windows 7 OS. I had Acrobat 10.0 on the XP computer. I took the Adobe files off of that computer and put them on an external hard drive. Can I now put Acrobat 10.0 on th

  • Planning to buy, many many questions.

    Hello, I am sorry if people have been asked this before but help would be greatly apprecaited. I have many questions such as: 1)Is MSN compatable with MacBook programming? 2)Can you run downloading programs such as Limewire on MacBooks or do you have

  • WRT54GS Settings Problem

    hi, i am having a problem changing my router settings. i tried using the Easy Link Setup software but that didn't do anything, also i have tried doing the http://192.168.1.1. thing, and whenever i go there this is how it looks [image] and there are n

  • I can't use edit in BC admin

    I can not edit my pages in Edit mode in BC admin. I got an error that some javascript is missing and page is not working correctly. Also error message said I should empty browsers cache but it did not help. Kind regards, Susi